1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at http://curl.haxx.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21###########################################################################
22
23AUTOMAKE_OPTIONS = foreign no-dependencies
24
25SUBDIRS = opts
26
27man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3	 \
28 curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3		 \
29 curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3		 \
30 curl_slist_append.3 curl_slist_free_all.3 curl_version.3		 \
31 curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3		 \
32 curl_strequal.3 curl_mprintf.3 curl_global_init.3 curl_global_cleanup.3 \
33 curl_multi_add_handle.3 curl_multi_cleanup.3 curl_multi_fdset.3	 \
34 curl_multi_info_read.3 curl_multi_init.3 curl_multi_perform.3		 \
35 curl_multi_remove_handle.3 curl_share_cleanup.3 curl_share_init.3	 \
36 curl_share_setopt.3 libcurl.3 libcurl-easy.3 libcurl-multi.3		 \
37 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3			 \
38 curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3	 \
39 libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3		 \
40 curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3		 \
41 curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3		 \
42 curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3			 \
43 curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3
44
45HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html		\
46 curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html	\
47 curl_easy_duphandle.html curl_formadd.html curl_formfree.html		\
48 curl_getdate.html curl_getenv.html curl_slist_append.html		\
49 curl_slist_free_all.html curl_version.html curl_version_info.html	\
50 curl_escape.html curl_unescape.html curl_free.html curl_strequal.html	\
51 curl_mprintf.html curl_global_init.html curl_global_cleanup.html	\
52 curl_multi_add_handle.html curl_multi_cleanup.html			\
53 curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html	\
54 curl_multi_perform.html curl_multi_remove_handle.html			\
55 curl_share_cleanup.html curl_share_init.html curl_share_setopt.html	\
56 libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html	\
57 libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html	\
58 curl_share_strerror.html curl_global_init_mem.html			\
59 libcurl-tutorial.html curl_easy_reset.html curl_easy_escape.html	\
60 curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html	\
61 curl_multi_timeout.html curl_formget.html curl_multi_assign.html	\
62 curl_easy_pause.html curl_easy_recv.html curl_easy_send.html		\
63 curl_multi_socket_action.html curl_multi_wait.html libcurl-symbols.html
64
65PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf			 \
66 curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf		 \
67 curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf		 \
68 curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf			 \
69 curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf		 \
70 curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf	 \
71 curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf		 \
72 curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf	 \
73 curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf	 \
74 curl_multi_remove_handle.pdf curl_share_cleanup.pdf curl_share_init.pdf \
75 curl_share_setopt.pdf libcurl.pdf libcurl-multi.pdf libcurl-easy.pdf	 \
76 libcurl-share.pdf libcurl-errors.pdf curl_easy_strerror.pdf		 \
77 curl_multi_strerror.pdf curl_share_strerror.pdf			 \
78 curl_global_init_mem.pdf libcurl-tutorial.pdf curl_easy_reset.pdf	 \
79 curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf	 \
80 curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf		 \
81 curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf		 \
82 curl_easy_send.pdf curl_multi_socket_action.pdf curl_multi_wait.pdf     \
83 libcurl-symbols.pdf
84
85m4macrodir = $(datadir)/aclocal
86dist_m4macro_DATA = libcurl.m4
87
88CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) libcurl-symbols.3
89
90EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) ABI \
91  symbols-in-versions symbols.pl mksymbolsmanpage.pl
92MAN2HTML= roffit --mandir=. < $< >$@
93
94SUFFIXES = .3 .html
95
96libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
97	perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
98
99html: $(HTMLPAGES)
100	cd opts; make html
101
102.3.html:
103	$(MAN2HTML)
104
105pdf: $(PDFPAGES)
106	cd opts; make pdf
107
108.3.pdf:
109	@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
110	groff -Tps -man $< >$$foo.ps; \
111	ps2pdf $$foo.ps $@; \
112	rm $$foo.ps; \
113	echo "converted $< to $@")
114
115# Make sure each option man page is referenced in the main man page
116TESTS = check-easy check-multi
117LOG_COMPILER = $(PERL)
118# The test fails if the log file contains any text
119AM_LOG_FLAGS = -p -e 'die "$$_" if ($$_);'
120
121check-easy: $(srcdir)/curl_easy_setopt.3 $(srcdir)/opts/CURLOPT*.3
122	OPTS="$$(ls $(srcdir)/opts/CURLOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
123	for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_easy_setopt.3 >/dev/null || echo Missing $$opt; done > $@
124
125check-multi: $(srcdir)/curl_multi_setopt.3 $(srcdir)/opts/CURLMOPT*.3
126	OPTS="$$(ls $(srcdir)/opts/CURLMOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
127	for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_multi_setopt.3 >/dev/null || echo Missing $$opt; done > $@
128