Tizen 2.0 Release
[external/libgnutls26.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 # 2009, 2010 Free Software Foundation, Inc.
4 #
5 # Author: Nikos Mavrogiannopoulos
6 #
7 # This file is part of GnuTLS.
8 #
9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This file is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this file; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23 EXTRA_DIST = TODO certtool.cfg gnutls.ps gnutls.pdf gnutls.html \
24         doxygen/Doxyfile.in doxygen/Doxyfile.orig texinfo.css
25
26 SUBDIRS = examples cyclo scripts manpages credentials
27 if ENABLE_GTK_DOC
28 SUBDIRS += reference
29 endif
30
31 info_TEXINFOS = gnutls.texi
32 gnutls_TEXINFOS = gnutls.texi fdl-1.3.texi lgpl-2.1.texi gpl-3.0.texi   \
33         cha-auth.texi cha-bib.texi cha-cert-auth.texi                   \
34         cha-ciphersuites.texi cha-copying.texi cha-functions.texi       \
35         cha-gtls-app.texi cha-internals.texi cha-intro-tls.texi         \
36         cha-library.texi cha-preface.texi cha-programs.texi             \
37         cha-tls-app.texi
38
39 # Examples.
40 gnutls_TEXINFOS += examples/ex-client1.c examples/ex-client2.c          \
41         examples/ex-session-info.c examples/ex-verify.c                 \
42         examples/ex-cert-select.c examples/ex-client-resume.c           \
43         examples/ex-client-srp.c examples/ex-rfc2818.c                  \
44         examples/ex-serv1.c examples/ex-serv-anon.c                     \
45         examples/ex-serv-pgp.c examples/ex-serv-srp.c                   \
46         examples/ex-alert.c examples/ex-x509-info.c examples/ex-crq.c   \
47         examples/ex-pkcs12.c
48
49 # Images.  Make sure there are eps + png + pdf of each, plus the source dia.
50 gnutls_TEXINFOS += gnutls-internals.dia gnutls-internals.eps            \
51                    gnutls-internals.png gnutls-internals.pdf
52 gnutls_TEXINFOS += gnutls-layers.dia gnutls-layers.eps                  \
53                    gnutls-layers.png gnutls-layers.pdf
54 gnutls_TEXINFOS += gnutls-crypto-layers.dia gnutls-crypto-layers.eps    \
55                    gnutls-crypto-layers.png gnutls-crypto-layers.pdf
56 gnutls_TEXINFOS += gnutls-pgp.dia gnutls-pgp.eps gnutls-pgp.png         \
57                    gnutls-pgp.pdf
58 gnutls_TEXINFOS += gnutls-x509.dia gnutls-x509.eps gnutls-x509.png      \
59                    gnutls-x509.pdf
60 gnutls_TEXINFOS += gnutls-logo.eps gnutls-logo.png gnutls-logo.pdf
61 gnutls_TEXINFOS += pkcs11-vision.dia pkcs11-vision.eps  \
62                    pkcs11-vision.png pkcs11-vision.pdf
63
64 # Images.  Make sure there are eps + png + pdf of each, plus the source dia.
65 gnutls_TEXINFOS += gnutls-certificate-user-use-case.dia \
66         gnutls-certificate-user-use-case.eps            \
67         gnutls-certificate-user-use-case.pdf            \
68         gnutls-certificate-user-use-case.png
69 gnutls_TEXINFOS += gnutls-client-server-use-case.dia    \
70         gnutls-client-server-use-case.eps               \
71         gnutls-client-server-use-case.pdf               \
72         gnutls-client-server-use-case.png
73 gnutls_TEXINFOS += gnutls-extensions_st.dia gnutls-extensions_st.eps    \
74         gnutls-extensions_st.pdf gnutls-extensions_st.png
75 gnutls_TEXINFOS += gnutls-handshake-sequence.dia                        \
76         gnutls-handshake-sequence.eps gnutls-handshake-sequence.pdf     \
77         gnutls-handshake-sequence.png
78 gnutls_TEXINFOS += gnutls-handshake-state.dia                   \
79         gnutls-handshake-state.eps gnutls-handshake-state.pdf   \
80         gnutls-handshake-state.png
81 gnutls_TEXINFOS += gnutls-mod_auth_st.dia gnutls-mod_auth_st.eps        \
82         gnutls-mod_auth_st.pdf gnutls-mod_auth_st.png
83 gnutls_TEXINFOS += gnutls-objects.dia gnutls-objects.eps        \
84         gnutls-objects.pdf gnutls-objects.png
85
86 imagesdir = $(infodir)
87 images_DATA = gnutls-certificate-user-use-case.png              \
88         gnutls-extensions_st.png gnutls-handshake-state.png     \
89         gnutls-layers.png gnutls-mod_auth_st.png gnutls-pgp.png \
90         gnutls-client-server-use-case.png                       \
91         gnutls-handshake-sequence.png gnutls-internals.png      \
92         gnutls-logo.png gnutls-objects.png gnutls-x509.png      \
93         pkcs11-vision.png
94
95 AM_MAKEINFOFLAGS = -I $(top_srcdir)/doc
96 TEXI2DVI = texi2dvi $(AM_MAKEINFOFLAGS)
97 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
98         --no-split --css-include=$(srcdir)/texinfo.css
99
100 MAINTAINERCLEANFILES =
101
102 # Generated texinfos.
103
104 gnutls_TEXINFOS += gnutls-api.texi extra-api.texi ia-api.texi   \
105         x509-api.texi pgp-api.texi
106 MAINTAINERCLEANFILES += gnutls-api.texi extra-api.texi ia-api.texi      \
107         x509-api.texi pgp-api.texi
108
109 gnutls-api.texi: $(srcdir)/../lib/*.c
110         echo "" > $@-tmp
111         for i in $^; do \
112                 echo -n "Creating documentation for file $$i... " && \
113                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
114                 echo "ok"; \
115         done
116         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
117         rm -f $@-tmp
118         mv -f $@-tmp2 $@
119
120 x509-api.texi: $(srcdir)/../lib/x509/*.c
121         echo "" > $@-tmp
122         for i in $^; do \
123                 echo -n "Creating documentation for file $$i... " && \
124                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
125                 echo "ok"; \
126         done
127         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
128         rm -f $@-tmp
129         mv -f $@-tmp2 $@
130
131 pgp-api.texi: $(srcdir)/../lib/openpgp/*.c
132         echo "" > $@-tmp
133         for i in $^; do \
134                 echo -n "Creating documentation for file $$i... " && \
135                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
136                 echo "ok"; \
137         done
138         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
139         rm -f $@-tmp
140         mv -f $@-tmp2 $@
141
142 extra-api.texi: $(srcdir)/../libextra/gnutls_extra.c
143         echo "" > $@-tmp
144         for i in $^; do \
145                 echo -n "Creating documentation for file $$i... " && \
146                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
147                 echo "ok"; \
148         done
149         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
150         rm -f $@-tmp
151         mv -f $@-tmp2 $@
152
153 ia-api.texi: $(srcdir)/../libextra/gnutls_ia.c
154         echo "" > $@-tmp
155         for i in $^; do \
156                 echo -n "Creating documentation for file $$i... " && \
157                 $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \
158                 echo "ok"; \
159         done
160         $(srcdir)/scripts/sort2.pl < $@-tmp > $@-tmp2
161         rm -f $@-tmp
162         mv -f $@-tmp2 $@
163
164 # Generated texinfos.
165
166 gnutls_TEXINFOS += error_codes.texi algorithms.texi
167 MAINTAINERCLEANFILES += error_codes.texi algorithms.texi
168
169 AM_CPPFLAGS = -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes
170
171 noinst_PROGRAMS = errcodes printlist
172
173 errcodes_SOURCES = errcodes.c
174 errcodes_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
175
176 printlist_SOURCES = printlist.c
177 printlist_LDADD = ../lib/libgnutls.la ../gl/libgnu.la
178
179 error_codes.texi: $(top_srcdir)/lib/gnutls_errors.c $(srcdir)/errcodes.c
180         make $(builddir)/errcodes
181         $(builddir)/errcodes > $@-tmp
182         mv -f $@-tmp $@
183
184 algorithms.texi: $(srcdir)/printlist.c
185         make $(builddir)/printlist
186         $(builddir)/printlist > $@-tmp
187         mv -f $@-tmp $@
188
189 # Guile texinfos.
190
191 guile_texi           = core.c.texi extra.c.texi
192 gnutls_TEXINFOS      += guile.texi $(guile_texi)
193 BUILT_SOURCES        = $(guile_texi)
194 MAINTAINERCLEANFILES += $(guile_texi)
195 EXTRA_DIST           += $(guile_texi) extract-guile-c-doc.scm
196
197 if HAVE_GUILE
198
199 GUILE_FOR_BUILD =                               \
200   GUILE_AUTO_COMPILE=0                          \
201   $(GUILE) -L $(top_srcdir)/guile/modules
202
203 SNARF_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)                      \
204          -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes    \
205          -I$(top_srcdir)/libextra/includes                              \
206          -I$(top_srcdir)/guile/src -I$(top_builddir)/guile/src
207
208 core.c.texi: $(top_srcdir)/guile/src/core.c
209         $(MAKE) -C ../guile/src built-sources &&                        \
210         $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm"       \
211            -e '(apply main (cdr (command-line)))'                       \
212            -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)"             \
213            > "$@"
214
215 extra.c.texi: $(top_srcdir)/guile/src/extra.c
216         $(MAKE) -C ../guile/src built-sources &&                        \
217         $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm"       \
218            -e '(apply main (cdr (command-line)))'                       \
219            -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)"             \
220            > "$@"
221
222
223 else !HAVE_GUILE
224
225 core.c.texi:
226         echo "(Guile not available, documentation not generated.)" > $@
227
228 extra.c.texi:
229         echo "(Guile not available, documentation not generated.)" > $@
230
231
232 endif !HAVE_GUILE