Stylesheet version number changed.
[exim.git] / doc / doc-docbook / Makefile
1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.1 2005/06/16 10:32:31 ph10 Exp $
2
3 # Make file for Exim documentation from Asciidoc source.
4
5 notarget:;    @echo "** You must specify a target, in the form x.y, where x is 'filter', 'spec',"
6               @echo "** or 'test', and y is 'xml', 'fo', 'ps', 'pdf', 'html', 'txt', or 'info'."
7               @echo "** One other possible target is 'exim.8'".
8               exit 1
9
10
11 ############################## MAN PAGE ################################
12
13 exim.8: spec.xml
14               ./x2man
15
16 ########################################################################
17
18
19 ############################### FILTER #################################
20
21 filter.xml:   filter.ascd MyAsciidoc.conf
22               asciidoc -d book -b docbook -f MyAsciidoc.conf filter.ascd
23
24 filter-fo.xml: filter.xml Pre-xml
25               Pre-xml -bookinfo <filter.xml >filter-fo.xml
26
27 filter-html.xml: filter.xml Pre-xml
28               Pre-xml <filter.xml >filter-html.xml
29
30 filter-txt.xml: filter.xml Pre-xml
31               Pre-xml -ascii <filter.xml >filter-txt.xml
32
33 filter.fo:    filter-fo.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
34               /bin/rm -rf filter.fo filter-fo.fo
35               xmlto -x MyStyle-filter-fo.xsl fo filter-fo.xml
36               /bin/mv -f filter-fo.fo filter.fo
37
38 filter.ps:    filter.fo
39               fop filter.fo -ps filter.ps
40
41 filter.pdf:   filter.fo
42               fop filter.fo -pdf filter.pdf
43
44 filter.html:  filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl MyStyle-html.xsl MyStyle.xsl
45               /bin/rm -rf filter.html filter-html.html
46               xmlto -x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml
47               /bin/mv -f filter-html.html filter.html
48                ./TidyHTML-filter
49
50 filter.txt:   filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl MyStyle.xsl
51               /bin/rm -rf filter-txt.html
52               xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
53               w3m -dump filter-txt.html >filter.txt
54
55 # I have not found a way of making docbook2texi write its output anywhere
56 # other than the file name that it makes up. The --to-stdout option does not
57 # work.
58
59 filter.info:  filter-txt.xml
60               docbook2texi filter-txt.xml
61               perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
62                 <exim_filtering.texi | Tidytxt >filter.texinfo
63               /bin/rm -rf exim_filtering.texi
64               makeinfo -o filter.info filter.texinfo
65
66 ########################################################################
67
68
69 ################################ SPEC ##################################
70
71 spec.xml:     spec.ascd MyAsciidoc.conf
72               asciidoc -d book -b docbook -f MyAsciidoc.conf spec.ascd
73
74 spec-fo.xml:  spec.xml Pre-xml
75               Pre-xml <spec.xml >spec-fo.xml
76
77 spec-html.xml: spec.xml Pre-xml
78               Pre-xml -abstract -oneindex <spec.xml >spec-html.xml
79
80 spec-txt.xml: spec.xml Pre-xml
81               Pre-xml -abstract -ascii -noindex <spec.xml >spec-txt.xml
82
83 spec.fo:      spec-fo.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl MyTitleStyle.xsl
84               /bin/rm -rf spec.fo spec-fo.fo
85               xmlto -x MyStyle-spec-fo.xsl fo spec-fo.xml
86               /bin/mv -f spec-fo.fo spec.fo
87
88 spec.ps:      spec.fo
89               FOP_OPTS=-Xmx512m fop spec.fo -ps spec.ps
90
91 spec.pdf:     spec.fo
92               FOP_OPTS=-Xmx512m fop spec.fo -pdf spec.pdf
93
94 spec.html:    spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl MyStyle-html.xsl MyStyle.xsl
95               /bin/rm -rf spec.html
96               xmlto -x MyStyle-chunk-html.xsl -o spec.html html spec-html.xml
97               ./TidyHTML-spec
98
99 spec.txt:     spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl MyStyle.xsl
100               /bin/rm -rf spec-txt.html
101               xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
102               w3m -dump spec-txt.html | Tidytxt >spec.txt
103
104 # I have not found a way of making docbook2texi write its output anywhere
105 # other than the file name that it makes up. The --to-stdout option does not
106 # work.
107
108 spec.info:    spec-txt.xml
109               docbook2texi spec-txt.xml
110               perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
111                 <the_exim_mta.texi >spec.texinfo
112               /bin/rm -rf the_exim_mta.texi
113               makeinfo -o spec.info spec.texinfo
114
115 ########################################################################
116
117
118 ################################ TEST ##################################
119
120 # These targets (similar to the above)  are for running little tests.
121
122 test.xml:     test.ascd MyAsciidoc.conf
123               asciidoc -d book -b docbook -f MyAsciidoc.conf test.ascd
124
125 test-fo.xml:  test.xml Pre-xml
126               ./Pre-xml <test.xml >test-fo.xml
127
128 test-html.xml: test.xml Pre-xml
129               ./Pre-xml -abstract -oneindex <test.xml >test-html.xml
130
131 test-txt.xml: test.xml Pre-xml
132               ./Pre-xml -abstract -ascii -noindex <test.xml >test-txt.xml
133
134 test.fo:      test-fo.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl MyTitleStyle.xsl
135               /bin/rm -rf test.fo test-fo.fo
136               xmlto -x MyStyle-spec-fo.xsl fo test-fo.xml
137               /bin/mv -f test-fo.fo test.fo
138
139 test.ps:      test.fo
140               fop test.fo -ps test.ps
141
142 test.pdf:     test.fo
143               fop test.fo -pdf test.pdf
144
145 test.html:    test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl MyStyle.xsl
146               /bin/rm -rf test.html test-html.html
147               xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
148               /bin/mv -f test-html.html test.html
149
150 test.txt:     test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl MyStyle.xsl
151               /bin/rm -rf test-txt.html
152               xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
153               w3m -dump test-txt.html | Tidytxt >test.txt
154
155 # I have not found a way of making docbook2texi write its output anywhere
156 # other than the file name that it makes up. The --to-stdout option does not
157 # work.
158
159 test.info:    test-txt.xml
160               docbook2texi test-txt.xml
161               perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
162                 <short_title.texi >test.texinfo
163               /bin/rm -rf short_title.texi
164               makeinfo -o test.info test.texinfo
165
166 ########################################################################
167
168
169 ################################ CLEAN #################################
170
171 clean:; /bin/rm -rf exim.8 \
172               filter*.xml spec*.xml test*.xml \
173               *.fo *.html *.pdf *.ps \
174               filter*.txt spec*.txt test*.txt \
175               *.info* *.texinfo *.texi
176
177 ########################################################################