Updated mk_exim_release.pl to work with git
[exim.git] / doc / doc-docbook / Makefile
CommitLineData
4a04fa7a 1# $Cambridge: exim/doc/doc-docbook/Makefile,v 1.14 2010/05/28 15:38:18 nm4 Exp $
168e428f 2
9b371988 3# Make file for Exim documentation from xfpt source.
168e428f
PH
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
207c78ae
NM
11############################# EVERYTHING ###############################
12#
13# Generate all the documentation files...
14#
4a04fa7a
NM
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 \
207c78ae
NM
18 exim.8
19
168e428f
PH
20############################## MAN PAGE ################################
21
9b371988 22exim.8: spec.xml x2man
168e428f
PH
23 ./x2man
24
25########################################################################
26
27
28############################### FILTER #################################
29
f89d2485
PH
30filter.xml: filter.xfpt
31 xfpt filter.xfpt
168e428f 32
f89d2485
PH
33filter-pr.xml: filter.xml Pre-xml
34 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
168e428f
PH
35
36filter-html.xml: filter.xml Pre-xml
f89d2485 37 ./Pre-xml -html <filter.xml >filter-html.xml
168e428f 38
f89d2485
PH
39filter-txt.xml: filter.xml Pre-xml
40 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
9b371988
PH
41
42filter-info.xml: filter.xml Pre-xml
f89d2485 43 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
168e428f 44
f89d2485
PH
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
168e428f 49
deca074a
PH
50# Do not use pdf2ps from the PDF version; better PS is generated directly.
51
f89d2485
PH
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
168e428f 59
deca074a
PH
60# Do not use ps2pdf from the PS version; better PDF is generated directly. It
61# contains cross links etc.
d1e83bff 62
f89d2485
PH
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
4aa45c31 74sdop-filter.pdf: filter.ps
f89d2485
PH
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###
168e428f 87
9b371988
PH
88filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
89 MyStyle-html.xsl MyStyle.xsl
168e428f
PH
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
068aaea8 93 ./TidyHTML-filter
168e428f 94
9b371988
PH
95filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
96 MyStyle.xsl
168e428f
PH
97 /bin/rm -rf filter-txt.html
98 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
9b371988 99 w3m -dump filter-txt.html | ./Tidytxt >filter.txt
168e428f
PH
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
9b371988
PH
105filter.info: filter-info.xml
106 docbook2texi filter-info.xml
168e428f 107 perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
207c78ae 108 <exim_filtering.texi | ./Tidytxt >filter.texinfo
168e428f
PH
109 /bin/rm -rf exim_filtering.texi
110 makeinfo -o filter.info filter.texinfo
111
112########################################################################
113
114
115################################ SPEC ##################################
116
f89d2485
PH
117spec.xml: spec.xfpt
118 xfpt spec.xfpt
168e428f 119
f89d2485
PH
120spec-pr.xml: spec.xml Pre-xml
121 ./Pre-xml -optbreak <spec.xml >spec-pr.xml
168e428f
PH
122
123spec-html.xml: spec.xml Pre-xml
f89d2485
PH
124 ./Pre-xml -html -oneindex \
125 <spec.xml >spec-html.xml
168e428f 126
f89d2485
PH
127spec-txt.xml: spec.xml Pre-xml
128 ./Pre-xml -ascii -html -noindex -quoteliteral \
129 <spec.xml >spec-txt.xml
9b371988
PH
130
131spec-info.xml: spec.xml Pre-xml
f89d2485
PH
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
168e428f 139
f89d2485
PH
140###
141### PS/PDF generation using fop
142###
168e428f 143
deca074a
PH
144# Do not use pdf2ps from the PDF version; better PS is generated directly.
145
f89d2485 146fop-spec.ps: spec.fo
068aaea8
PH
147 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
148 mv spec-tmp.ps spec.ps
168e428f 149
deca074a 150# Do not use ps2pdf from the PS version; better PDF is generated directly. It
9b371988
PH
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.
d1e83bff 153
f89d2485 154fop-spec.pdf: spec.fo PageLabelPDF
deca074a 155 FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
4f578862 156 ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
168e428f 157
f89d2485
PH
158###
159### PS/PDF generation using SDoP
160###
161
162sdop-spec.ps: spec-pr.xml
163 sdop -o spec.ps spec-pr.xml
164
4aa45c31 165sdop-spec.pdf: spec.ps
f89d2485
PH
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
9b371988
PH
179spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
180 MyStyle-html.xsl MyStyle.xsl
4f578862
PH
181 /bin/rm -rf spec_html
182 xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml
168e428f
PH
183 ./TidyHTML-spec
184
9b371988
PH
185spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
186 MyStyle.xsl
168e428f
PH
187 /bin/rm -rf spec-txt.html
188 xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
9b371988 189 w3m -dump spec-txt.html | ./Tidytxt >spec.txt
168e428f
PH
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
9b371988
PH
195spec.info: spec-info.xml
196 docbook2texi spec-info.xml
4f578862 197 ./TidyInfo <the_exim_mta.texi >spec.texinfo
168e428f 198 /bin/rm -rf the_exim_mta.texi
595028e4 199 makeinfo -o spec.info --no-split spec.texinfo
168e428f
PH
200
201########################################################################
202
203
204################################ TEST ##################################
205
206# These targets (similar to the above) are for running little tests.
207
9b371988
PH
208test.xml: test.xfpt
209 xfpt test.xfpt
168e428f 210
f89d2485
PH
211test-pr.xml: test.xml Pre-xml
212 ./Pre-xml <test.xml >test-pr.xml
168e428f
PH
213
214test-html.xml: test.xml Pre-xml
9b371988 215 ./Pre-xml -html -oneindex <test.xml >test-html.xml
168e428f
PH
216
217test-txt.xml: test.xml Pre-xml
9b371988
PH
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
168e428f 223
f89d2485 224test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
9b371988 225 MyTitleStyle.xsl
f89d2485
PH
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###
168e428f 233
deca074a
PH
234# Do not use pdf2ps from the PDF version; better PS is generated directly.
235
f89d2485 236fop-test.ps: test.fo
068aaea8
PH
237 fop test.fo -ps test-tmp.ps
238 mv test-tmp.ps test.ps
168e428f 239
deca074a
PH
240# Do not use ps2pdf from the PS version; better PDF is generated directly. It
241# contains cross links etc.
d1e83bff 242
f89d2485 243fop-test.pdf: test.fo
deca074a
PH
244 fop test.fo -pdf test-tmp.pdf
245 mv test-tmp.pdf test.pdf
168e428f 246
f89d2485
PH
247###
248### PS/PDF generation using SDoP
249###
250
251sdop-test.ps: test-pr.xml
252 sdop -o test.ps test-pr.xml
253
4aa45c31 254sdop-test.pdf: test.ps
f89d2485
PH
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
9b371988
PH
269test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
270 MyStyle.xsl
168e428f
PH
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
9b371988
PH
275test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
276 MyStyle.xsl
168e428f
PH
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
9b371988
PH
285test.info: test-info.xml
286 docbook2texi test-info.xml
4f578862 287 ./TidyInfo <short_title.texi >test.texinfo
168e428f
PH
288 /bin/rm -rf short_title.texi
289 makeinfo -o test.info test.texinfo
290
291########################################################################
292
293
a2119650
NM
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
168e428f
PH
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########################################################################