Add cyclomatic code complexity charts.
[gnutls:gnutls.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 Free Software Foundation
3 #
4 # Author: Nikos Mavrogiannopoulos
5 #
6 # This file is part of GNUTLS.
7 #
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.
12 #
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.
17 #
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.
21
22 EXTRA_DIST = TODO README.GIT README.autoconf certtool.cfg gnutls.ps     \
23         gnutls.pdf gnutls.html extract-guile-c-doc.scm                  \
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                                           \
33         fdl-1.3.texi lgpl-2.1.texi gpl-3.0.texi                         \
34         gnutls-api.texi gnutls-extra-api.texi ia-api.texi               \
35         x509-api.texi pgp-api.texi                                      \
36         examples/ex-client1.c examples/ex-client2.c                     \
37         examples/ex-session-info.c examples/ex-verify.c                 \
38         examples/ex-cert-select.c examples/ex-client-resume.c           \
39         examples/ex-client-srp.c examples/ex-client-tlsia.c             \
40         examples/ex-rfc2818.c examples/ex-serv1.c                       \
41         examples/ex-serv-export.c examples/ex-serv-anon.c               \
42         examples/ex-serv-pgp.c examples/ex-serv-srp.c                   \
43         examples/ex-alert.c examples/ex-x509-info.c examples/ex-crq.c   \
44         examples/ex-pkcs12.c guile.texi $(guile_texi)
45
46 # Generated texinfos.
47 gnutls_TEXINFOS += error_codes.texi algorithms.texi
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-pgp.dia gnutls-pgp.eps gnutls-pgp.png         \
55                    gnutls-pgp.pdf
56 gnutls_TEXINFOS += gnutls-x509.dia gnutls-x509.eps gnutls-x509.png      \
57                    gnutls-x509.pdf
58 gnutls_TEXINFOS += gnutls-logo.eps gnutls-logo.png gnutls-logo.pdf
59
60 # Images.  Make sure there are eps + png + pdf of each, plus the source dia.
61 gnutls_TEXINFOS += gnutls-certificate-user-use-case.dia \
62         gnutls-certificate-user-use-case.eps            \
63         gnutls-certificate-user-use-case.pdf            \
64         gnutls-certificate-user-use-case.png
65 gnutls_TEXINFOS += gnutls-client-server-use-case.dia    \
66         gnutls-client-server-use-case.eps               \
67         gnutls-client-server-use-case.pdf               \
68         gnutls-client-server-use-case.png
69 gnutls_TEXINFOS += gnutls-extensions_st.dia gnutls-extensions_st.eps    \
70         gnutls-extensions_st.pdf gnutls-extensions_st.png
71 gnutls_TEXINFOS += gnutls-handshake-sequence.dia                        \
72         gnutls-handshake-sequence.eps gnutls-handshake-sequence.pdf     \
73         gnutls-handshake-sequence.png
74 gnutls_TEXINFOS += gnutls-handshake-state.dia                   \
75         gnutls-handshake-state.eps gnutls-handshake-state.pdf   \
76         gnutls-handshake-state.png
77 gnutls_TEXINFOS += gnutls-mod_auth_st.dia gnutls-mod_auth_st.eps        \
78         gnutls-mod_auth_st.pdf gnutls-mod_auth_st.png
79 gnutls_TEXINFOS += gnutls-objects.dia gnutls-objects.eps        \
80         gnutls-objects.pdf gnutls-objects.png
81
82 imagesdir = $(infodir)
83 images_DATA = gnutls-certificate-user-use-case.png              \
84         gnutls-extensions_st.png gnutls-handshake-state.png     \
85         gnutls-layers.png gnutls-mod_auth_st.png gnutls-pgp.png \
86         gnutls-client-server-use-case.png                       \
87         gnutls-handshake-sequence.png gnutls-internals.png      \
88         gnutls-logo.png gnutls-objects.png gnutls-x509.png
89
90 AM_MAKEINFOFLAGS = -I $(top_srcdir)/doc
91 TEXI2DVI = texi2dvi $(AM_MAKEINFOFLAGS)
92 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
93         --no-split --css-include=texinfo.css
94
95 ../lib/gnutls-api.texi:
96         cd ../lib && make gnutls-api.texi
97
98 ../libextra/gnutls-extra-api.texi:
99         cd ../libextra && make gnutls-extra-api.texi
100
101 ../lib/x509/x509-api.texi:
102         cd ../lib/x509 && make x509-api.texi
103
104 ../lib/openpgp/pgp-api.texi:
105         cd ../lib/openpgp && make pgp-api.texi
106
107 ../libextra/ia-api.texi:
108         cd ../libextra && make ia-api.texi
109
110 gnutls-api.texi: ../lib/gnutls-api.texi
111         -$(srcdir)/scripts/sort2.pl < ../lib/gnutls-api.texi > gnutls-api.texi
112
113 gnutls-extra-api.texi: ../libextra/gnutls-extra-api.texi
114         -$(srcdir)/scripts/sort2.pl < ../libextra/gnutls-extra-api.texi > gnutls-extra-api.texi
115
116 x509-api.texi: ../lib/x509/x509-api.texi
117         -$(srcdir)/scripts/sort2.pl < ../lib/x509/x509-api.texi > x509-api.texi
118
119 pgp-api.texi: ../lib/openpgp/pgp-api.texi
120         -$(srcdir)/scripts/sort2.pl < ../lib/openpgp/pgp-api.texi > pgp-api.texi
121
122 ia-api.texi: ../libextra/ia-api.texi
123         -$(srcdir)/scripts/sort2.pl < ../libextra/ia-api.texi > ia-api.texi
124
125 # Generated texinfos.
126
127 error_codes.texi: ../lib/gnutls_errors.c ../src/errcodes.c
128         -../src/errcodes > error_codes.texi
129
130 algorithms.texi: ../src/printlist.c
131         -../src/printlist > algorithms.texi
132
133
134 guile_texi           = core.c.texi extra.c.texi
135 BUILT_SOURCES        = $(guile_texi)
136 MAINTAINERCLEANFILES = $(guile_texi)
137 EXTRA_DIST           += $(guile_texi)
138
139 if HAVE_GUILE
140
141 #
142 # Guile documentation extraction from C code.
143 #
144
145 GUILE_FOR_BUILD = $(GUILE) -L $(top_srcdir)/guile/modules
146
147 SNARF_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)                      \
148          -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes    \
149          -I$(top_srcdir)/libextra/includes                              \
150          -I$(top_srcdir)/guile/src -I$(top_builddir)/guile/src
151
152 core.c.texi: $(top_srcdir)/guile/src/core.c
153         $(MAKE) -C ../guile/src built-sources &&                        \
154         $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm"       \
155            -e '(apply main (cdr (command-line)))'                       \
156            -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)"             \
157            > "$@"
158
159 extra.c.texi: $(top_srcdir)/guile/src/extra.c
160         $(MAKE) -C ../guile/src built-sources &&                        \
161         $(GUILE_FOR_BUILD) -l "$(srcdir)/extract-guile-c-doc.scm"       \
162            -e '(apply main (cdr (command-line)))'                       \
163            -- "$^" "$(CPP)" "$(SNARF_CPPFLAGS) $(CPPFLAGS)"             \
164            > "$@"
165
166
167 else !HAVE_GUILE
168
169 core.c.texi:
170         echo "(Guile not available, documentation not generated.)" > $@
171
172 extra.c.texi:
173         echo "(Guile not available, documentation not generated.)" > $@
174
175
176 endif !HAVE_GUILE