summaryrefslogtreecommitdiff
path: root/doc/latex/Makefile.am
blob: 1e86cf381768efa94675f5baf2daa510e8448ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
TEX_OBJECTS = gnutls.tex macros.tex fdl.tex cover.tex gnutls.bib

GEN_TEX_OBJECTS = cha-preface.tex cha-library.tex cha-intro-tls.tex cha-auth.tex \
  cha-cert-auth.tex cha-gtls-app.tex cha-tls-app.tex cha-programs.tex cha-support.tex \
  cha-functions.tex error_codes.tex cha-ciphersuites.tex algorithms.tex \
  cha-errors.tex

cha-preface.tex: ../cha-preface.texi
	../scripts/mytexi2latex $< > $@

cha-library.tex: ../cha-library.texi
	../scripts/mytexi2latex $< > $@

cha-intro-tls.tex: ../cha-intro-tls.texi
	../scripts/mytexi2latex $< > $@

cha-auth.tex: ../cha-auth.texi
	../scripts/mytexi2latex $< > $@

cha-cert-auth.tex: ../cha-cert-auth.texi
	../scripts/mytexi2latex $< > $@

cha-gtls-app.tex: ../cha-gtls-app.texi
	../scripts/mytexi2latex $< > $@

cha-tls-app.tex: ../cha-tls-app.texi
	../scripts/mytexi2latex $< > $@

cha-programs.tex: ../cha-programs.texi
	../scripts/mytexi2latex $< > $@

cha-support.tex: ../cha-support.texi
	../scripts/mytexi2latex $< > $@

cha-functions.tex: ../cha-functions.texi
	../scripts/mytexi2latex $< > $@

cha-errors.tex: ../cha-errors.texi
	../scripts/mytexi2latex $< > $@

cha-ciphersuites.tex: ../cha-ciphersuites.texi
	../scripts/mytexi2latex $< > $@

error_codes.tex: $(top_srcdir)/lib/gnutls_errors.c $(srcdir)/../errcodes
	$(builddir)/../errcodes --latex > $@-tmp
	mv -f $@-tmp $@

algorithms.tex: $(srcdir)/../printlist.c $(builddir)/../printlist
	$(builddir)/../printlist --latex > $@-tmp
	mv -f $@-tmp $@

gnutls-api.tex: $(srcdir)/../../lib/*.c $(srcdir)/../../lib/ext/*.c $(srcdir)/../../lib/auth/*.c $(srcdir)/../../lib/algorithms/*.c
	echo "" > $@-tmp
	for i in $^; do \
		echo -n "Creating documentation for file $$i... " && \
		$(srcdir)/../scripts/gdoc -tex $$i >> $@-tmp && \
		echo "ok"; \
	done
	$(srcdir)/../scripts/sort1.pl < $@-tmp > $@-tmp2
	rm -f $@-tmp
	mv -f $@-tmp2 $@

x509-api.tex: $(srcdir)/../../lib/x509/*.c
	echo "" > $@-tmp
	for i in $^; do \
		echo -n "Creating documentation for file $$i... " && \
		$(srcdir)/../scripts/gdoc -tex $$i >> $@-tmp && \
		echo "ok"; \
	done
	$(srcdir)/../scripts/sort1.pl < $@-tmp > $@-tmp2
	rm -f $@-tmp
	mv -f $@-tmp2 $@

pgp-api.tex: $(srcdir)/../../lib/openpgp/*.c
	echo "" > $@-tmp
	for i in $^; do \
		echo -n "Creating documentation for file $$i... " && \
		$(srcdir)/../scripts/gdoc -tex $$i >> $@-tmp && \
		echo "ok"; \
	done
	$(srcdir)/../scripts/sort1.pl < $@-tmp > $@-tmp2
	rm -f $@-tmp
	mv -f $@-tmp2 $@

extra-api.tex: $(srcdir)/../../libextra/gnutls_extra.c
	echo "" > $@-tmp
	for i in $^; do \
		echo -n "Creating documentation for file $$i... " && \
		$(srcdir)/../scripts/gdoc -tex $$i >> $@-tmp && \
		echo "ok"; \
	done
	$(srcdir)/../scripts/sort1.pl < $@-tmp > $@-tmp2
	rm -f $@-tmp
	mv -f $@-tmp2 $@

SOURCE_GEN_FILES =  extra-api.tex pgp-api.tex x509-api.tex gnutls-api.tex

gnutls.pdf: $(TEX_OBJECTS) $(GEN_TEX_OBJECTS) $(SOURCE_GEN_FILES)
	-pdflatex gnutls.tex
	-bibtex gnutls
	-makeindex gnutls.idx
	-pdflatex gnutls.tex && pdflatex gnutls.tex

clean-am:
	rm -f $(GEN_TEX_OBJECTS) $(SOURCE_GEN_FILES) gnutls.aux gnutls.bbl gnutls.blg gnutls.idx gnutls.ilg gnutls.ind gnutls.log gnutls.out gnutls.toc