1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 # Author: Nikos Mavrogiannopoulos
6 # This file is part of GnuTLS.
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # This file is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this file; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 EXTRA_DIST = TODO certtool.cfg gnutls.ps gnutls.pdf gnutls.html \
23 doxygen/Doxyfile.in doxygen/Doxyfile.orig texinfo.css \
24 gnutls-guile.pdf gnutls-guile.html stamp_enums
26 SUBDIRS = examples cyclo scripts manpages credentials latex
40 SRC_DEF_CLI += ../src/cli-args.def
41 SRC_DEF_CLI_DEBUG += ../src/cli-debug-args.def
42 SRC_DEF_SERV += ../src/serv-args.def
43 SRC_DEF_CERTTOOL += ../src/certtool-args.def
44 SRC_DEF_OCSPTOOL += ../src/ocsptool-args.def
45 SRC_DEF_SRPTOOL += ../src/srptool-args.def
46 SRC_DEF_PSKTOOL += ../src/psk-args.def
47 SRC_DEF_P11TOOL += ../src/p11tool-args.def
50 invoke-gnutls-cli.texi: $(SRC_DEF_CLI)
51 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
53 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
54 mv -f ../doc/$@.tmp ../doc/$@ && \
57 invoke-gnutls-cli-debug.texi: $(SRC_DEF_CLI_DEBUG)
58 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
60 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
61 mv -f ../doc/$@.tmp ../doc/$@ && \
64 invoke-gnutls-serv.texi: $(SRC_DEF_SERV)
65 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
67 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
68 mv -f ../doc/$@.tmp ../doc/$@ && \
71 invoke-certtool.texi: $(SRC_DEF_CERTTOOL)
72 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
74 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
75 mv -f ../doc/$@.tmp ../doc/$@ && \
78 invoke-ocsptool.texi: $(SRC_DEF_OCSPTOOL)
79 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
81 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
82 mv -f ../doc/$@.tmp ../doc/$@ && \
85 invoke-srptool.texi: $(SRC_DEF_SRPTOOL)
86 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
88 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
89 mv -f ../doc/$@.tmp ../doc/$@ && \
91 sed -i 's/@subheading/@subsubheading/g' ../doc/$@ && \
92 sed -i 's/@section/@subsection/g' ../doc/$@
94 invoke-psktool.texi: $(SRC_DEF_PSKTOOL)
95 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
97 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
98 mv -f ../doc/$@.tmp ../doc/$@ && \
100 sed -i 's/@subheading/@subsubheading/g' ../doc/$@ && \
101 sed -i 's/@section/@subsection/g' ../doc/$@
103 invoke-p11tool.texi: $(SRC_DEF_P11TOOL)
104 @-cd ../src/ && autogen -Tagtexi-cmd.tpl $< && \
106 ../doc/scripts/cleanup-autogen.pl <../src/$@ >../doc/$@.tmp && \
107 mv -f ../doc/$@.tmp ../doc/$@ && \
109 sed -i 's/@subheading/@subsubheading/g' ../doc/$@ && \
110 sed -i 's/@section/@subsection/g' ../doc/$@
112 info_TEXINFOS = gnutls.texi gnutls-guile.texi
113 gnutls_TEXINFOS = gnutls.texi fdl-1.3.texi \
114 cha-bib.texi cha-cert-auth.texi cha-cert-auth2.texi \
115 cha-ciphersuites.texi cha-copying.texi cha-functions.texi \
116 cha-gtls-app.texi cha-internals.texi cha-intro-tls.texi \
117 cha-library.texi cha-preface.texi cha-programs.texi \
118 sec-tls-app.texi cha-errors.texi cha-support.texi \
119 cha-shared-key.texi cha-gtls-examples.texi
121 gnutls_TEXINFOS += invoke-gnutls-cli.texi invoke-gnutls-cli-debug.texi \
122 invoke-gnutls-serv.texi invoke-certtool.texi invoke-srptool.texi \
123 invoke-ocsptool.texi invoke-psktool.texi invoke-p11tool.texi
126 gnutls_TEXINFOS += examples/ex-client-anon.c \
127 examples/ex-session-info.c examples/ex-verify.c \
128 examples/ex-cert-select.c examples/ex-client-resume.c \
129 examples/ex-client-srp.c examples/ex-client-x509.c \
130 examples/ex-serv-x509.c examples/ex-serv-anon.c \
131 examples/ex-serv-pgp.c examples/ex-serv-srp.c \
132 examples/ex-alert.c examples/ex-x509-info.c examples/ex-crq.c \
133 examples/ex-pkcs12.c examples/ex-client-dtls.c
135 # Images. Make sure there are eps + png + pdf of each, plus the source dia.
136 gnutls_TEXINFOS += gnutls-internals.dia gnutls-internals.eps \
138 gnutls_TEXINFOS += gnutls-layers.dia gnutls-layers.eps \
140 gnutls_TEXINFOS += gnutls-crypto-layers.dia gnutls-crypto-layers.eps \
141 gnutls-crypto-layers.png
142 gnutls_TEXINFOS += gnutls-pgp.dia gnutls-pgp.eps gnutls-pgp.png
143 gnutls_TEXINFOS += gnutls-x509.dia gnutls-x509.eps gnutls-x509.png
144 gnutls_TEXINFOS += gnutls-logo.eps gnutls-logo.png
145 gnutls_TEXINFOS += pkcs11-vision.dia pkcs11-vision.eps pkcs11-vision.png
147 # Images. Make sure there are eps + png + pdf of each, plus the source dia.
148 gnutls_TEXINFOS += gnutls-client-server-use-case.dia \
149 gnutls-client-server-use-case.eps \
150 gnutls-client-server-use-case.png
151 gnutls_TEXINFOS += gnutls-handshake-sequence.dia \
152 gnutls-handshake-sequence.eps gnutls-handshake-sequence.png
153 gnutls_TEXINFOS += gnutls-handshake-state.dia \
154 gnutls-handshake-state.eps gnutls-handshake-state.png
155 gnutls_TEXINFOS += gnutls-modauth.dia gnutls-modauth.eps \
158 imagesdir = $(infodir)
160 gnutls-handshake-state.png \
161 gnutls-layers.png gnutls-modauth.png gnutls-pgp.png \
162 gnutls-client-server-use-case.png \
163 gnutls-handshake-sequence.png gnutls-internals.png \
164 gnutls-logo.png gnutls-x509.png \
167 AM_MAKEINFOFLAGS = -I $(top_srcdir)/doc
168 TEXI2DVI = texi2dvi $(AM_MAKEINFOFLAGS)
169 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
170 --no-split --css-include=$(srcdir)/texinfo.css
172 MAINTAINERCLEANFILES =
174 # Generated texinfos.
176 gnutls_TEXINFOS += gnutls-api.texi x509-api.texi pgp-api.texi \
177 pkcs12-api.texi pkcs11-api.texi abstract-api.texi \
178 compat-api.texi dtls-api.texi crypto-api.texi ocsp-api.texi
180 MAINTAINERCLEANFILES += gnutls-api.texi x509-api.texi pgp-api.texi \
181 pkcs12-api.texi pkcs11-api.texi abstract-api.texi \
182 compat-api.texi dtls-api.texi crypto-api.texi ocsp-api.texi
184 HEADER_FILES = $(top_srcdir)/lib/includes/gnutls/gnutls.h.in \
185 $(top_srcdir)/lib/includes/gnutls/x509.h $(top_srcdir)/lib/includes/gnutls/openpgp.h \
186 $(top_srcdir)/lib/includes/gnutls/pkcs12.h $(top_srcdir)/lib/includes/gnutls/pkcs11.h \
187 $(top_srcdir)/lib/includes/gnutls/abstract.h $(top_srcdir)/lib/includes/gnutls/compat.h \
188 $(top_srcdir)/lib/includes/gnutls/dtls.h $(top_srcdir)/lib/includes/gnutls/crypto.h \
189 $(top_srcdir)/lib/includes/gnutls/ocsp.h
191 gnutls-api.texi: $(top_srcdir)/lib/includes/gnutls/gnutls.h.in
193 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/gnutls.h.in|sort|uniq`; do \
194 echo -n "Creating documentation for $$i... " && \
195 $(srcdir)/scripts/gdoc -texinfo \
197 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
202 x509-api.texi: $(top_srcdir)/lib/includes/gnutls/x509.h
204 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/x509.h|sort|uniq`; do \
205 echo -n "Creating documentation for $$i... " && \
206 $(srcdir)/scripts/gdoc -texinfo \
208 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
213 pgp-api.texi: $(top_srcdir)/lib/includes/gnutls/openpgp.h
215 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/openpgp.h|sort|uniq`; do \
216 echo -n "Creating documentation for $$i... " && \
217 $(srcdir)/scripts/gdoc -texinfo \
219 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
225 pkcs12-api.texi: $(top_srcdir)/lib/includes/gnutls/pkcs12.h
227 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/pkcs12.h|sort|uniq`; do \
228 echo -n "Creating documentation for $$i... " && \
229 $(srcdir)/scripts/gdoc -texinfo \
231 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
236 pkcs11-api.texi: $(top_srcdir)/lib/includes/gnutls/pkcs11.h
238 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/pkcs11.h|sort|uniq`; do \
239 echo -n "Creating documentation for $$i... " && \
240 $(srcdir)/scripts/gdoc -texinfo \
242 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
247 abstract-api.texi: $(top_srcdir)/lib/includes/gnutls/abstract.h
249 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/abstract.h|sort|uniq`; do \
250 echo -n "Creating documentation for $$i... " && \
251 $(srcdir)/scripts/gdoc -texinfo \
253 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
258 compat-api.texi: $(top_srcdir)/lib/includes/gnutls/compat.h
260 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/compat.h|sort|uniq`; do \
261 echo -n "Creating documentation for $$i... " && \
262 $(srcdir)/scripts/gdoc -texinfo \
264 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
269 dtls-api.texi: $(top_srcdir)/lib/includes/gnutls/dtls.h
271 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/dtls.h|sort|uniq`; do \
272 echo -n "Creating documentation for $$i... " && \
273 $(srcdir)/scripts/gdoc -texinfo \
275 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
280 crypto-api.texi: $(top_srcdir)/lib/includes/gnutls/crypto.h
282 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/crypto.h|sort|uniq`; do \
283 echo -n "Creating documentation for $$i... " && \
284 $(srcdir)/scripts/gdoc -texinfo \
286 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
291 ocsp-api.texi: $(top_srcdir)/lib/includes/gnutls/ocsp.h
293 for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/ocsp.h|sort|uniq`; do \
294 echo -n "Creating documentation for file $$i... " && \
295 $(srcdir)/scripts/gdoc -texinfo \
297 $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*/*.c >> $@-tmp 2>/dev/null && \
302 # Generated texinfos.
303 # for some reason it does not work when cross compiling
305 gnutls_TEXINFOS += error_codes.texi algorithms.texi alerts.texi enums.texi
308 DISTCLEANFILES = error_codes.texi algorithms.texi alerts.texi enums.texi
311 -I$(top_builddir)/lib/includes -I$(top_srcdir)/lib/includes \
314 EXTRA_PROGRAMS = errcodes printlist alert-printlist
316 errcodes_SOURCES = errcodes.c common.c common.h
317 errcodes_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
319 printlist_SOURCES = printlist.c common.c common.h
320 printlist_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
322 alert_printlist_SOURCES = alert-printlist.c common.c common.h
323 alert_printlist_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
325 error_codes.texi: $(top_srcdir)/lib/gnutls_errors.c $(srcdir)/errcodes.c
326 $(MAKE) $(builddir)/errcodes
327 $(builddir)/errcodes > $@-tmp
330 algorithms.texi: $(top_srcdir)/lib/algorithms/ciphers.c $(srcdir)/printlist.c
331 $(MAKE) $(builddir)/printlist
332 $(builddir)/printlist > $@-tmp
335 alerts.texi: $(top_srcdir)/lib/gnutls_alert.c $(srcdir)/alert-printlist.c
336 $(MAKE) $(builddir)/alert-printlist
337 $(builddir)/alert-printlist > $@-tmp
340 enums.texi: $(HEADER_FILES)
343 echo -n "Creating documentation for $$i... " && \
344 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
350 ENUMS += enums/gnutls_alert_description_t
351 ENUMS += enums/gnutls_alert_level_t
352 ENUMS += enums/gnutls_certificate_import_flags
353 ENUMS += enums/gnutls_certificate_print_formats_t
354 ENUMS += enums/gnutls_certificate_request_t
355 ENUMS += enums/gnutls_certificate_status_t
356 ENUMS += enums/gnutls_certificate_type_t
357 ENUMS += enums/gnutls_certificate_verify_flags
358 ENUMS += enums/gnutls_channel_binding_t
359 ENUMS += enums/gnutls_cipher_algorithm_t
360 ENUMS += enums/gnutls_close_request_t
361 ENUMS += enums/gnutls_compression_method_t
362 ENUMS += enums/gnutls_credentials_type_t
363 ENUMS += enums/gnutls_digest_algorithm_t
364 ENUMS += enums/gnutls_ecc_curve_t
365 ENUMS += enums/gnutls_handshake_description_t
366 ENUMS += enums/gnutls_kx_algorithm_t
367 ENUMS += enums/gnutls_mac_algorithm_t
368 ENUMS += enums/gnutls_openpgp_crt_fmt_t
369 ENUMS += enums/gnutls_openpgp_crt_status_t
370 ENUMS += enums/gnutls_params_type_t
371 ENUMS += enums/gnutls_pk_algorithm_t
372 ENUMS += enums/gnutls_pkcs11_obj_attr_t
373 ENUMS += enums/gnutls_pkcs11_obj_info_t
374 ENUMS += enums/gnutls_pkcs11_obj_type_t
375 ENUMS += enums/gnutls_pkcs11_token_info_t
376 ENUMS += enums/gnutls_pkcs12_bag_type_t
377 ENUMS += enums/gnutls_pkcs_encrypt_flags_t
378 ENUMS += enums/gnutls_privkey_type_t
379 ENUMS += enums/gnutls_protocol_t
380 ENUMS += enums/gnutls_psk_key_flags
381 ENUMS += enums/gnutls_rnd_level_t
382 ENUMS += enums/gnutls_sec_param_t
383 ENUMS += enums/gnutls_server_name_type_t
384 ENUMS += enums/gnutls_sign_algorithm_t
385 ENUMS += enums/gnutls_supplemental_data_format_type_t
386 ENUMS += enums/gnutls_x509_crt_fmt_t
387 ENUMS += enums/gnutls_x509_subject_alt_name_t
389 gnutls_TEXINFOS += $(ENUMS)
390 DISTCLEANFILES += $(ENUMS) stamp_enums
392 stamp_enums: enums.texi
393 $(MAKE) compare-makefile
395 $(srcdir)/scripts/split-texi.pl enums enum < enums.texi
398 $(ENUMS): stamp_enums
401 ENUMS=`grep '^@c ' enums.texi | sed 's/@c //g' | sort`; \
403 for i in $$ENUMS; do \
404 STR="$$STR\nENUMS += enums/$$i"; \
406 grep -v -e '^ENUMS += ' $(srcdir)/Makefile.am | \
407 perl -p -e "s,^ENUMS =,ENUMS =$$STR," > tmp-$@; \
408 diff -u $(srcdir)/Makefile.am tmp-$@
411 .PHONY: compare-makefile
415 guile_texi = core.c.texi
416 BUILT_SOURCES = $(guile_texi)
417 MAINTAINERCLEANFILES += $(guile_texi)
418 EXTRA_DIST += $(guile_texi) extract-guile-c-doc.scm
419 guile_TEXINFOS = gnutls-guile.texi $(guile_texi)
424 GUILE_AUTO_COMPILE=0 \
425 $(GUILE) -L $(top_srcdir)/guile/modules
427 SNARF_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
428 -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes \
429 -I$(top_srcdir)/extra/includes \
430 -I$(top_srcdir)/guile/src -I$(top_builddir)/guile/src \
433 core.c.texi: $(top_srcdir)/guile/src/core.c
434 $(MAKE) -C ../guile/src built-sources && \
435 $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm" \
436 -e '(apply main (cdr (command-line)))' \
437 -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)" \
443 echo "(Guile not available, documentation not generated.)" > $@
447 gnutls.xml: epub.texi
448 makeinfo --docbook $<
449 sed -i 's/\&\#8226;//g' $@
451 gnutls.epub: gnutls.xml
453 epub-fix --delete-unmanifested gnutls.epub