Sync with TP.
[gnutls.git] / doc / Makefile.am
blobe3a20467b3ed664957e80456e5300011a803740f
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
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 README.gaa certtool.cfg gnutls.ps gnutls.pdf  \
23         gnutls.html doxygen/Doxyfile.in doxygen/Doxyfile.orig   \
24         texinfo.css
26 SUBDIRS = examples cyclo scripts manpages credentials
27 if ENABLE_GTK_DOC
28 SUBDIRS += reference
29 endif
31 info_TEXINFOS = gnutls.texi
32 gnutls_TEXINFOS = gnutls.texi fdl-1.3.texi lgpl-2.1.texi gpl-3.0.texi
34 # Examples.
35 gnutls_TEXINFOS += examples/ex-client1.c examples/ex-client2.c          \
36         examples/ex-session-info.c examples/ex-verify.c                 \
37         examples/ex-cert-select.c examples/ex-client-resume.c           \
38         examples/ex-client-srp.c examples/ex-client-tlsia.c             \
39         examples/ex-rfc2818.c examples/ex-serv1.c                       \
40         examples/ex-serv-export.c examples/ex-serv-anon.c               \
41         examples/ex-serv-pgp.c examples/ex-serv-srp.c                   \
42         examples/ex-alert.c examples/ex-x509-info.c examples/ex-crq.c   \
43         examples/ex-pkcs12.c
45 # Images.  Make sure there are eps + png + pdf of each, plus the source dia.
46 gnutls_TEXINFOS += gnutls-internals.dia gnutls-internals.eps            \
47                    gnutls-internals.png gnutls-internals.pdf
48 gnutls_TEXINFOS += gnutls-layers.dia gnutls-layers.eps                  \
49                    gnutls-layers.png gnutls-layers.pdf
50 gnutls_TEXINFOS += gnutls-pgp.dia gnutls-pgp.eps gnutls-pgp.png         \
51                    gnutls-pgp.pdf
52 gnutls_TEXINFOS += gnutls-x509.dia gnutls-x509.eps gnutls-x509.png      \
53                    gnutls-x509.pdf
54 gnutls_TEXINFOS += gnutls-logo.eps gnutls-logo.png gnutls-logo.pdf
56 # Images.  Make sure there are eps + png + pdf of each, plus the source dia.
57 gnutls_TEXINFOS += gnutls-certificate-user-use-case.dia \
58         gnutls-certificate-user-use-case.eps            \
59         gnutls-certificate-user-use-case.pdf            \
60         gnutls-certificate-user-use-case.png
61 gnutls_TEXINFOS += gnutls-client-server-use-case.dia    \
62         gnutls-client-server-use-case.eps               \
63         gnutls-client-server-use-case.pdf               \
64         gnutls-client-server-use-case.png
65 gnutls_TEXINFOS += gnutls-extensions_st.dia gnutls-extensions_st.eps    \
66         gnutls-extensions_st.pdf gnutls-extensions_st.png
67 gnutls_TEXINFOS += gnutls-handshake-sequence.dia                        \
68         gnutls-handshake-sequence.eps gnutls-handshake-sequence.pdf     \
69         gnutls-handshake-sequence.png
70 gnutls_TEXINFOS += gnutls-handshake-state.dia                   \
71         gnutls-handshake-state.eps gnutls-handshake-state.pdf   \
72         gnutls-handshake-state.png
73 gnutls_TEXINFOS += gnutls-mod_auth_st.dia gnutls-mod_auth_st.eps        \
74         gnutls-mod_auth_st.pdf gnutls-mod_auth_st.png
75 gnutls_TEXINFOS += gnutls-objects.dia gnutls-objects.eps        \
76         gnutls-objects.pdf gnutls-objects.png
78 imagesdir = $(infodir)
79 images_DATA = gnutls-certificate-user-use-case.png              \
80         gnutls-extensions_st.png gnutls-handshake-state.png     \
81         gnutls-layers.png gnutls-mod_auth_st.png gnutls-pgp.png \
82         gnutls-client-server-use-case.png                       \
83         gnutls-handshake-sequence.png gnutls-internals.png      \
84         gnutls-logo.png gnutls-objects.png gnutls-x509.png
86 AM_MAKEINFOFLAGS = -I $(top_srcdir)/doc
87 TEXI2DVI = texi2dvi $(AM_MAKEINFOFLAGS)
88 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
89         --no-split --css-include=$(srcdir)/texinfo.css
91 MAINTAINERCLEANFILES =
93 # Generated texinfos.
95 gnutls_TEXINFOS += gnutls-api.texi extra-api.texi ia-api.texi   \
96         x509-api.texi pgp-api.texi
97 MAINTAINERCLEANFILES += gnutls-api.texi extra-api.texi ia-api.texi      \
98         x509-api.texi pgp-api.texi
100 gnutls-api.texi: $(srcdir)/../lib/*.c
101         echo "" > $@-tmp
102         for i in $^; do \
103                 echo -n "Creating documentation for file $$i... " && \
104                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
105                 echo "ok"; \
106         done
107         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
108         rm -f $@-tmp
109         mv $@-tmp2 $@
111 x509-api.texi: $(srcdir)/../lib/x509/*.c
112         echo "" > $@-tmp
113         for i in $^; do \
114                 echo -n "Creating documentation for file $$i... " && \
115                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
116                 echo "ok"; \
117         done
118         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
119         rm -f $@-tmp
120         mv $@-tmp2 $@
122 pgp-api.texi: $(srcdir)/../lib/openpgp/*.c
123         echo "" > $@-tmp
124         for i in $^; do \
125                 echo -n "Creating documentation for file $$i... " && \
126                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
127                 echo "ok"; \
128         done
129         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
130         rm -f $@-tmp
131         mv $@-tmp2 $@
133 extra-api.texi: $(srcdir)/../libextra/gnutls_extra.c
134         echo "" > $@-tmp
135         for i in $^; do \
136                 echo -n "Creating documentation for file $$i... " && \
137                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
138                 echo "ok"; \
139         done
140         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
141         rm -f $@-tmp
142         mv $@-tmp2 $@
144 ia-api.texi: $(srcdir)/../libextra/gnutls_ia.c
145         echo "" > $@-tmp
146         for i in $^; do \
147                 echo -n "Creating documentation for file $$i... " && \
148                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
149                 echo "ok"; \
150         done
151         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
152         rm -f $@-tmp
153         mv $@-tmp2 $@
155 # Generated texinfos.
157 gnutls_TEXINFOS += error_codes.texi algorithms.texi
158 MAINTAINERCLEANFILES += error_codes.texi algorithms.texi
160 AM_CPPFLAGS = -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes
162 noinst_PROGRAMS = errcodes printlist
164 errcodes_SOURCES = errcodes.c
165 errcodes_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
167 printlist_SOURCES = printlist.c
168 printlist_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
170 error_codes.texi: $(top_srcdir)/lib/gnutls_errors.c $(srcdir)/errcodes.c
171         make $(builddir)/errcodes
172         $(builddir)/errcodes > $@-tmp
173         mv $@-tmp $@
175 algorithms.texi: $(srcdir)/printlist.c
176         make $(builddir)/printlist
177         $(builddir)/printlist > $@-tmp
178         mv $@-tmp $@
180 # Guile texinfos.
182 guile_texi           = core.c.texi extra.c.texi
183 gnutls_TEXINFOS      += guile.texi $(guile_texi)
184 BUILT_SOURCES        = $(guile_texi)
185 MAINTAINERCLEANFILES += $(guile_texi)
186 EXTRA_DIST           += $(guile_texi) extract-guile-c-doc.scm
188 if HAVE_GUILE
190 GUILE_FOR_BUILD =                               \
191   GUILE_AUTO_COMPILE=0                          \
192   $(GUILE) -L $(top_srcdir)/guile/modules
194 SNARF_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)                      \
195          -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes    \
196          -I$(top_srcdir)/libextra/includes                              \
197          -I$(top_srcdir)/guile/src -I$(top_builddir)/guile/src
199 core.c.texi: $(top_srcdir)/guile/src/core.c
200         $(MAKE) -C ../guile/src built-sources &&                        \
201         $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm"       \
202            -e '(apply main (cdr (command-line)))'                       \
203            -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)"             \
204            > "$@"
206 extra.c.texi: $(top_srcdir)/guile/src/extra.c
207         $(MAKE) -C ../guile/src built-sources &&                        \
208         $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm"       \
209            -e '(apply main (cdr (command-line)))'                       \
210            -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)"             \
211            > "$@"
214 else !HAVE_GUILE
216 core.c.texi:
217         echo "(Guile not available, documentation not generated.)" > $@
219 extra.c.texi:
220         echo "(Guile not available, documentation not generated.)" > $@
223 endif !HAVE_GUILE