Updated mk_exim_release.pl to work with git
[exim.git] / doc / doc-docbook / Makefile
... / ...
CommitLineData
1# $Cambridge: exim/doc/doc-docbook/Makefile,v 1.14 2010/05/28 15:38:18 nm4 Exp $
2
3# Make file for Exim documentation from xfpt source.
4
5notarget:; @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############################# EVERYTHING ###############################
12#
13# Generate all the documentation files...
14#
15## removed info files as I cannot generate them - spec.info filter.info
16everything: spec.pdf spec.ps spec.html spec.txt \
17 filter.pdf filter.ps filter.html filter.txt \
18 exim.8
19
20############################## MAN PAGE ################################
21
22exim.8: spec.xml x2man
23 ./x2man
24
25########################################################################
26
27
28############################### FILTER #################################
29
30filter.xml: filter.xfpt
31 xfpt filter.xfpt
32
33filter-pr.xml: filter.xml Pre-xml
34 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
35
36filter-html.xml: filter.xml Pre-xml
37 ./Pre-xml -html <filter.xml >filter-html.xml
38
39filter-txt.xml: filter.xml Pre-xml
40 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
41
42filter-info.xml: filter.xml Pre-xml
43 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
44
45filter.fo: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
46 /bin/rm -rf filter.fo filter-pr.fo
47 xmlto -x MyStyle-filter-fo.xsl fo filter-pr.xml
48 /bin/mv -f filter-pr.fo filter.fo
49
50# Do not use pdf2ps from the PDF version; better PS is generated directly.
51
52###
53### PS/PDF generation using fop
54###
55
56fop-filter.ps: filter.fo
57 fop filter.fo -ps filter-tmp.ps
58 mv filter-tmp.ps filter.ps
59
60# Do not use ps2pdf from the PS version; better PDF is generated directly. It
61# contains cross links etc.
62
63fop-filter.pdf: filter.fo PageLabelPDF
64 fop filter.fo -pdf filter-tmp.pdf
65 ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf
66
67###
68### PS/PDF generation using SDoP
69###
70
71sdop-filter.ps: filter-pr.xml
72 sdop -o filter.ps filter-pr.xml
73
74sdop-filter.pdf: filter.ps
75 ps2pdf filter.ps filter.pdf
76
77###
78### PS/PDF default setting
79###
80
81filter.ps: sdop-filter.ps
82
83filter.pdf: sdop-filter.pdf
84
85###
86###
87
88filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
89 MyStyle-html.xsl MyStyle.xsl
90 /bin/rm -rf filter.html filter-html.html
91 xmlto -x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml
92 /bin/mv -f filter-html.html filter.html
93 ./TidyHTML-filter
94
95filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
96 MyStyle.xsl
97 /bin/rm -rf filter-txt.html
98 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
99 w3m -dump filter-txt.html | ./Tidytxt >filter.txt
100
101# I have not found a way of making docbook2texi write its output anywhere
102# other than the file name that it makes up. The --to-stdout option does not
103# work.
104
105filter.info: filter-info.xml
106 docbook2texi filter-info.xml
107 perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
108 <exim_filtering.texi | ./Tidytxt >filter.texinfo
109 /bin/rm -rf exim_filtering.texi
110 makeinfo -o filter.info filter.texinfo
111
112########################################################################
113
114
115################################ SPEC ##################################
116
117spec.xml: spec.xfpt
118 xfpt spec.xfpt
119
120spec-pr.xml: spec.xml Pre-xml
121 ./Pre-xml -optbreak <spec.xml >spec-pr.xml
122
123spec-html.xml: spec.xml Pre-xml
124 ./Pre-xml -html -oneindex \
125 <spec.xml >spec-html.xml
126
127spec-txt.xml: spec.xml Pre-xml
128 ./Pre-xml -ascii -html -noindex -quoteliteral \
129 <spec.xml >spec-txt.xml
130
131spec-info.xml: spec.xml Pre-xml
132 ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
133
134spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
135 MyTitleStyle.xsl
136 /bin/rm -rf spec.fo spec-pr.fo
137 xmlto -x MyStyle-spec-fo.xsl fo spec-pr.xml
138 /bin/mv -f spec-pr.fo spec.fo
139
140###
141### PS/PDF generation using fop
142###
143
144# Do not use pdf2ps from the PDF version; better PS is generated directly.
145
146fop-spec.ps: spec.fo
147 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
148 mv spec-tmp.ps spec.ps
149
150# Do not use ps2pdf from the PS version; better PDF is generated directly. It
151# contains cross links etc. We post-process it to add page label information
152# so that the page identifiers shown by acroread are the correct page numbers.
153
154fop-spec.pdf: spec.fo PageLabelPDF
155 FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
156 ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
157
158###
159### PS/PDF generation using SDoP
160###
161
162sdop-spec.ps: spec-pr.xml
163 sdop -o spec.ps spec-pr.xml
164
165sdop-spec.pdf: spec.ps
166 ps2pdf spec.ps spec.pdf
167
168###
169### PS/PDF default setting
170###
171
172spec.ps: sdop-spec.ps
173
174spec.pdf: sdop-spec.pdf
175
176###
177###
178
179spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
180 MyStyle-html.xsl MyStyle.xsl
181 /bin/rm -rf spec_html
182 xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml
183 ./TidyHTML-spec
184
185spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
186 MyStyle.xsl
187 /bin/rm -rf spec-txt.html
188 xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
189 w3m -dump spec-txt.html | ./Tidytxt >spec.txt
190
191# I have not found a way of making docbook2texi write its output anywhere
192# other than the file name that it makes up. The --to-stdout option does not
193# work.
194
195spec.info: spec-info.xml
196 docbook2texi spec-info.xml
197 ./TidyInfo <the_exim_mta.texi >spec.texinfo
198 /bin/rm -rf the_exim_mta.texi
199 makeinfo -o spec.info --no-split spec.texinfo
200
201########################################################################
202
203
204################################ TEST ##################################
205
206# These targets (similar to the above) are for running little tests.
207
208test.xml: test.xfpt
209 xfpt test.xfpt
210
211test-pr.xml: test.xml Pre-xml
212 ./Pre-xml <test.xml >test-pr.xml
213
214test-html.xml: test.xml Pre-xml
215 ./Pre-xml -html -oneindex <test.xml >test-html.xml
216
217test-txt.xml: test.xml Pre-xml
218 ./Pre-xml -ascii -html -noindex -quoteinfo \
219 <test.xml >test-txt.xml
220
221test-info.xml: test.xml Pre-xml
222 ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
223
224test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
225 MyTitleStyle.xsl
226 /bin/rm -rf test.fo test-pr.fo
227 xmlto -x MyStyle-spec-fo.xsl fo test-pr.xml
228 /bin/mv -f test-pr.fo test.fo
229
230###
231### PS/PDF generation using fop
232###
233
234# Do not use pdf2ps from the PDF version; better PS is generated directly.
235
236fop-test.ps: test.fo
237 fop test.fo -ps test-tmp.ps
238 mv test-tmp.ps test.ps
239
240# Do not use ps2pdf from the PS version; better PDF is generated directly. It
241# contains cross links etc.
242
243fop-test.pdf: test.fo
244 fop test.fo -pdf test-tmp.pdf
245 mv test-tmp.pdf test.pdf
246
247###
248### PS/PDF generation using SDoP
249###
250
251sdop-test.ps: test-pr.xml
252 sdop -o test.ps test-pr.xml
253
254sdop-test.pdf: test.ps
255 ps2pdf test.ps test.pdf
256
257###
258### PS/PDF default setting
259###
260
261test.ps: sdop-test.ps
262
263test.pdf: sdop-test.pdf
264
265###
266###
267
268
269test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
270 MyStyle.xsl
271 /bin/rm -rf test.html test-html.html
272 xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
273 /bin/mv -f test-html.html test.html
274
275test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
276 MyStyle.xsl
277 /bin/rm -rf test-txt.html
278 xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
279 w3m -dump test-txt.html | Tidytxt >test.txt
280
281# I have not found a way of making docbook2texi write its output anywhere
282# other than the file name that it makes up. The --to-stdout option does not
283# work.
284
285test.info: test-info.xml
286 docbook2texi test-info.xml
287 ./TidyInfo <short_title.texi >test.texinfo
288 /bin/rm -rf short_title.texi
289 makeinfo -o test.info test.texinfo
290
291########################################################################
292
293
294############################## OS FIXUP ################################
295
296# Yes, we've advanced so far in text processing that we now have to
297# hardcode in complete paths and so become dependent upon exactly where
298# files were installed for xsl:import. Which of course varies by OS.
299
300os-fixup:
301 ./OS-Fixups
302
303########################################################################
304
305
306################################ CLEAN #################################
307
308clean:; /bin/rm -rf exim.8 \
309 filter*.xml spec*.xml test*.xml \
310 *.fo *.html *.pdf *.ps \
311 filter*.txt spec*.txt test*.txt \
312 *.info* *.texinfo *.texi
313
314########################################################################