#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
###########################################################################

AUTOMAKE_OPTIONS = foreign no-dependencies

man_MANS = CURLOPT_ACCEPT_ENCODING.3 CURLOPT_APPEND.3			\
 CURLOPT_AUTOREFERER.3 CURLOPT_BUFFERSIZE.3 CURLOPT_CAINFO.3		\
 CURLOPT_CAPATH.3 CURLOPT_CLOSESOCKETDATA.3				\
 CURLOPT_CLOSESOCKETFUNCTION.3 CURLOPT_CONNECTTIMEOUT.3			\
 CURLOPT_COOKIE.3 CURLOPT_COOKIEFILE.3 CURLOPT_COOKIEJAR.3		\
 CURLOPT_COOKIESESSION.3 CURLOPT_CRLF.3 CURLOPT_CUSTOMREQUEST.3		\
 CURLOPT_DEBUGDATA.3 CURLOPT_DEBUGFUNCTION.3 CURLOPT_DIRLISTONLY.3	\
 CURLOPT_DNS_CACHE_TIMEOUT.3 CURLOPT_DNS_USE_GLOBAL_CACHE.3		\
 CURLOPT_EGDSOCKET.3 CURLOPT_ERRORBUFFER.3 CURLOPT_FAILONERROR.3	\
 CURLOPT_FILETIME.3 CURLOPT_FOLLOWLOCATION.3 CURLOPT_FORBID_REUSE.3	\
 CURLOPT_FRESH_CONNECT.3 CURLOPT_FTPPORT.3 CURLOPT_FTP_USE_EPSV.3	\
 CURLOPT_HEADER.3 CURLOPT_HEADERDATA.3 CURLOPT_HEADERFUNCTION.3		\
 CURLOPT_HTTP200ALIASES.3 CURLOPT_HTTPGET.3 CURLOPT_HTTPHEADER.3	\
 CURLOPT_HTTPPOST.3 CURLOPT_HTTPPROXYTUNNEL.3 CURLOPT_HTTP_VERSION.3	\
 CURLOPT_INFILESIZE.3 CURLOPT_INTERFACE.3 CURLOPT_IOCTLDATA.3		\
 CURLOPT_IOCTLFUNCTION.3 CURLOPT_KEYPASSWD.3 CURLOPT_KRBLEVEL.3		\
 CURLOPT_LOW_SPEED_LIMIT.3 CURLOPT_LOW_SPEED_TIME.3			\
 CURLOPT_MAXCONNECTS.3 CURLOPT_MAXREDIRS.3 CURLOPT_NETRC.3		\
 CURLOPT_NOBODY.3 CURLOPT_NOPROGRESS.3 CURLOPT_NOSIGNAL.3		\
 CURLOPT_OPENSOCKETDATA.3 CURLOPT_OPENSOCKETFUNCTION.3 CURLOPT_PORT.3	\
 CURLOPT_POST.3 CURLOPT_POSTFIELDS.3 CURLOPT_POSTFIELDSIZE.3		\
 CURLOPT_POSTQUOTE.3 CURLOPT_PREQUOTE.3 CURLOPT_PRIVATE.3		\
 CURLOPT_PROGRESSDATA.3 CURLOPT_PROGRESSFUNCTION.3 CURLOPT_PROXY.3	\
 CURLOPT_PROXYPORT.3 CURLOPT_PROXYTYPE.3 CURLOPT_PROXYUSERPWD.3		\
 CURLOPT_PUT.3 CURLOPT_QUOTE.3 CURLOPT_RANDOM_FILE.3 CURLOPT_RANGE.3	\
 CURLOPT_READDATA.3 CURLOPT_READFUNCTION.3 CURLOPT_REFERER.3		\
 CURLOPT_RESUME_FROM.3 CURLOPT_SEEKDATA.3 CURLOPT_SEEKFUNCTION.3	\
 CURLOPT_SHARE.3 CURLOPT_SOCKOPTDATA.3 CURLOPT_SOCKOPTFUNCTION.3	\
 CURLOPT_SSLCERT.3 CURLOPT_SSLCERTTYPE.3 CURLOPT_SSL_CIPHER_LIST.3	\
 CURLOPT_SSLENGINE.3 CURLOPT_SSLENGINE_DEFAULT.3 CURLOPT_SSLKEY.3	\
 CURLOPT_SSLKEYTYPE.3 CURLOPT_SSL_VERIFYHOST.3 CURLOPT_SSL_VERIFYPEER.3	\
 CURLOPT_SSLVERSION.3 CURLOPT_STDERR.3 CURLOPT_TELNETOPTIONS.3		\
 CURLOPT_TIMECONDITION.3 CURLOPT_TIMEOUT.3 CURLOPT_TIMEVALUE.3		\
 CURLOPT_TRANSFERTEXT.3 CURLOPT_UNRESTRICTED_AUTH.3 CURLOPT_UPLOAD.3	\
 CURLOPT_URL.3 CURLOPT_USERAGENT.3 CURLOPT_USERPWD.3 CURLOPT_VERBOSE.3	\
 CURLOPT_WILDCARDMATCH.3 CURLOPT_WRITEDATA.3 CURLOPT_WRITEFUNCTION.3	\
 CURLOPT_XFERINFODATA.3 CURLOPT_XFERINFOFUNCTION.3

HTMLPAGES = CURLOPT_ACCEPT_ENCODING.html CURLOPT_APPEND.html		\
 CURLOPT_AUTOREFERER.html CURLOPT_BUFFERSIZE.html CURLOPT_CAINFO.html	\
 CURLOPT_CAPATH.html CURLOPT_CLOSESOCKETDATA.html			\
 CURLOPT_CLOSESOCKETFUNCTION.html CURLOPT_CONNECTTIMEOUT.html		\
 CURLOPT_COOKIE.html CURLOPT_COOKIEFILE.html CURLOPT_COOKIEJAR.html	\
 CURLOPT_COOKIESESSION.html CURLOPT_CRLF.html				\
 CURLOPT_CUSTOMREQUEST.html CURLOPT_DEBUGDATA.html			\
 CURLOPT_DEBUGFUNCTION.html CURLOPT_DIRLISTONLY.html			\
 CURLOPT_DNS_CACHE_TIMEOUT.html CURLOPT_DNS_USE_GLOBAL_CACHE.html	\
 CURLOPT_EGDSOCKET.html CURLOPT_ERRORBUFFER.html			\
 CURLOPT_FAILONERROR.html CURLOPT_FILETIME.html				\
 CURLOPT_FOLLOWLOCATION.html CURLOPT_FORBID_REUSE.html			\
 CURLOPT_FRESH_CONNECT.html CURLOPT_FTPPORT.html			\
 CURLOPT_FTP_USE_EPSV.html CURLOPT_HEADER.html CURLOPT_HEADERDATA.html	\
 CURLOPT_HEADERFUNCTION.html CURLOPT_HTTP200ALIASES.html		\
 CURLOPT_HTTPGET.html CURLOPT_HTTPHEADER.html CURLOPT_HTTPPOST.html	\
 CURLOPT_HTTPPROXYTUNNEL.html CURLOPT_HTTP_VERSION.html			\
 CURLOPT_INFILESIZE.html CURLOPT_INTERFACE.html CURLOPT_IOCTLDATA.html	\
 CURLOPT_IOCTLFUNCTION.html CURLOPT_KEYPASSWD.html			\
 CURLOPT_KRBLEVEL.html CURLOPT_LOW_SPEED_LIMIT.html			\
 CURLOPT_LOW_SPEED_TIME.html CURLOPT_MAXCONNECTS.html			\
 CURLOPT_MAXREDIRS.html CURLOPT_NETRC.html CURLOPT_NOBODY.html		\
 CURLOPT_NOPROGRESS.html CURLOPT_NOSIGNAL.html				\
 CURLOPT_OPENSOCKETDATA.html CURLOPT_OPENSOCKETFUNCTION.html		\
 CURLOPT_PORT.html CURLOPT_POST.html CURLOPT_POSTFIELDS.html		\
 CURLOPT_POSTFIELDSIZE.html CURLOPT_POSTQUOTE.html			\
 CURLOPT_PREQUOTE.html CURLOPT_PRIVATE.html CURLOPT_PROGRESSDATA.html	\
 CURLOPT_PROGRESSFUNCTION.html CURLOPT_PROXY.html			\
 CURLOPT_PROXYPORT.html CURLOPT_PROXYTYPE.html				\
 CURLOPT_PROXYUSERPWD.html CURLOPT_PUT.html CURLOPT_QUOTE.html		\
 CURLOPT_RANDOM_FILE.html CURLOPT_RANGE.html CURLOPT_READDATA.html	\
 CURLOPT_READFUNCTION.html CURLOPT_REFERER.html				\
 CURLOPT_RESUME_FROM.html CURLOPT_SEEKDATA.html				\
 CURLOPT_SEEKFUNCTION.html CURLOPT_SHARE.html CURLOPT_SOCKOPTDATA.html	\
 CURLOPT_SOCKOPTFUNCTION.html CURLOPT_SSLCERT.html			\
 CURLOPT_SSLCERTTYPE.html CURLOPT_SSL_CIPHER_LIST.html			\
 CURLOPT_SSLENGINE.html CURLOPT_SSLENGINE_DEFAULT.html			\
 CURLOPT_SSLKEY.html CURLOPT_SSLKEYTYPE.html				\
 CURLOPT_SSL_VERIFYHOST.html CURLOPT_SSL_VERIFYPEER.html		\
 CURLOPT_SSLVERSION.html CURLOPT_STDERR.html CURLOPT_TELNETOPTIONS.html	\
 CURLOPT_TIMECONDITION.html CURLOPT_TIMEOUT.html CURLOPT_TIMEVALUE.html	\
 CURLOPT_TRANSFERTEXT.html CURLOPT_UNRESTRICTED_AUTH.html		\
 CURLOPT_UPLOAD.html CURLOPT_URL.html CURLOPT_USERAGENT.html		\
 CURLOPT_USERPWD.html CURLOPT_VERBOSE.html CURLOPT_WILDCARDMATCH.html	\
 CURLOPT_WRITEDATA.html CURLOPT_WRITEFUNCTION.html			\
 CURLOPT_XFERINFODATA.html CURLOPT_XFERINFOFUNCTION.html

PDFPAGES = CURLOPT_ACCEPT_ENCODING.pdf CURLOPT_APPEND.pdf		\
 CURLOPT_AUTOREFERER.pdf CURLOPT_BUFFERSIZE.pdf CURLOPT_CAINFO.pdf	\
 CURLOPT_CAPATH.pdf CURLOPT_CLOSESOCKETDATA.pdf				\
 CURLOPT_CLOSESOCKETFUNCTION.pdf CURLOPT_CONNECTTIMEOUT.pdf		\
 CURLOPT_COOKIE.pdf CURLOPT_COOKIEFILE.pdf CURLOPT_COOKIEJAR.pdf	\
 CURLOPT_COOKIESESSION.pdf CURLOPT_CRLF.pdf CURLOPT_CUSTOMREQUEST.pdf	\
 CURLOPT_DEBUGDATA.pdf CURLOPT_DEBUGFUNCTION.pdf			\
 CURLOPT_DIRLISTONLY.pdf CURLOPT_DNS_CACHE_TIMEOUT.pdf			\
 CURLOPT_DNS_USE_GLOBAL_CACHE.pdf CURLOPT_EGDSOCKET.pdf			\
 CURLOPT_ERRORBUFFER.pdf CURLOPT_FAILONERROR.pdf CURLOPT_FILETIME.pdf	\
 CURLOPT_FOLLOWLOCATION.pdf CURLOPT_FORBID_REUSE.pdf			\
 CURLOPT_FRESH_CONNECT.pdf CURLOPT_FTPPORT.pdf CURLOPT_FTP_USE_EPSV.pdf	\
 CURLOPT_HEADER.pdf CURLOPT_HEADERDATA.pdf CURLOPT_HEADERFUNCTION.pdf	\
 CURLOPT_HTTP200ALIASES.pdf CURLOPT_HTTPGET.pdf CURLOPT_HTTPHEADER.pdf	\
 CURLOPT_HTTPPOST.pdf CURLOPT_HTTPPROXYTUNNEL.pdf			\
 CURLOPT_HTTP_VERSION.pdf CURLOPT_INFILESIZE.pdf CURLOPT_INTERFACE.pdf	\
 CURLOPT_IOCTLDATA.pdf CURLOPT_IOCTLFUNCTION.pdf CURLOPT_KEYPASSWD.pdf	\
 CURLOPT_KRBLEVEL.pdf CURLOPT_LOW_SPEED_LIMIT.pdf			\
 CURLOPT_LOW_SPEED_TIME.pdf CURLOPT_MAXCONNECTS.pdf			\
 CURLOPT_MAXREDIRS.pdf CURLOPT_NETRC.pdf CURLOPT_NOBODY.pdf		\
 CURLOPT_NOPROGRESS.pdf CURLOPT_NOSIGNAL.pdf CURLOPT_OPENSOCKETDATA.pdf	\
 CURLOPT_OPENSOCKETFUNCTION.pdf CURLOPT_PORT.pdf CURLOPT_POST.pdf	\
 CURLOPT_POSTFIELDS.pdf CURLOPT_POSTFIELDSIZE.pdf CURLOPT_POSTQUOTE.pdf	\
 CURLOPT_PREQUOTE.pdf CURLOPT_PRIVATE.pdf CURLOPT_PROGRESSDATA.pdf	\
 CURLOPT_PROGRESSFUNCTION.pdf CURLOPT_PROXY.pdf CURLOPT_PROXYPORT.pdf	\
 CURLOPT_PROXYTYPE.pdf CURLOPT_PROXYUSERPWD.pdf CURLOPT_PUT.pdf		\
 CURLOPT_QUOTE.pdf CURLOPT_RANDOM_FILE.pdf CURLOPT_RANGE.pdf		\
 CURLOPT_READDATA.pdf CURLOPT_READFUNCTION.pdf CURLOPT_REFERER.pdf	\
 CURLOPT_RESUME_FROM.pdf CURLOPT_SEEKDATA.pdf CURLOPT_SEEKFUNCTION.pdf	\
 CURLOPT_SHARE.pdf CURLOPT_SOCKOPTDATA.pdf CURLOPT_SOCKOPTFUNCTION.pdf	\
 CURLOPT_SSLCERT.pdf CURLOPT_SSLCERTTYPE.pdf				\
 CURLOPT_SSL_CIPHER_LIST.pdf CURLOPT_SSLENGINE.pdf			\
 CURLOPT_SSLENGINE_DEFAULT.pdf CURLOPT_SSLKEY.pdf			\
 CURLOPT_SSLKEYTYPE.pdf CURLOPT_SSL_VERIFYHOST.pdf			\
 CURLOPT_SSL_VERIFYPEER.pdf CURLOPT_SSLVERSION.pdf CURLOPT_STDERR.pdf	\
 CURLOPT_TELNETOPTIONS.pdf CURLOPT_TIMECONDITION.pdf			\
 CURLOPT_TIMEOUT.pdf CURLOPT_TIMEVALUE.pdf CURLOPT_TRANSFERTEXT.pdf	\
 CURLOPT_UNRESTRICTED_AUTH.pdf CURLOPT_UPLOAD.pdf CURLOPT_URL.pdf	\
 CURLOPT_USERAGENT.pdf CURLOPT_USERPWD.pdf CURLOPT_VERBOSE.pdf		\
 CURLOPT_WILDCARDMATCH.pdf CURLOPT_WRITEDATA.pdf			\
 CURLOPT_WRITEFUNCTION.pdf CURLOPT_XFERINFODATA.pdf			\
 CURLOPT_XFERINFOFUNCTION.pdf

CLEANFILES = $(HTMLPAGES) $(PDFPAGES)

EXTRA_DIST = $(man_MANS) $(HTMLPAGES) $(PDFPAGES)
MAN2HTML= roffit --mandir=. < $< >$@

SUFFIXES = .3 .html

html: $(HTMLPAGES)

.3.html:
	$(MAN2HTML)

pdf: $(PDFPAGES)

.3.pdf:
	@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
	groff -Tps -man $< >$$foo.ps; \
	ps2pdf $$foo.ps $@; \
	rm $$foo.ps; \
	echo "converted $< to $@")

mancheck:
	ls `awk -F, '/^  CINIT/ { a=substr($$1, 9); print "CURLOPT_" a ".3"}' $(top_srcdir)/include/curl/curl.h`