1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.10 2007/04/17 13:06:09 ph10 Exp $
3 # Make file for Exim documentation from xfpt source.
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'".
11 ############################## MAN PAGE ################################
13 exim.8: spec.xml x2man
16 ########################################################################
19 ############################### FILTER #################################
21 filter.xml: filter.xfpt
24 filter-pr.xml: filter.xml Pre-xml
25 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
27 filter-html.xml: filter.xml Pre-xml
28 ./Pre-xml -html <filter.xml >filter-html.xml
30 filter-txt.xml: filter.xml Pre-xml
31 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
33 filter-info.xml: filter.xml Pre-xml
34 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
36 filter.fo: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
37 /bin/rm -rf filter.fo filter-pr.fo
38 xmlto -x MyStyle-filter-fo.xsl fo filter-pr.xml
39 /bin/mv -f filter-pr.fo filter.fo
41 # Do not use pdf2ps from the PDF version; better PS is generated directly.
44 ### PS/PDF generation using fop
47 fop-filter.ps: filter.fo
48 fop filter.fo -ps filter-tmp.ps
49 mv filter-tmp.ps filter.ps
51 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
52 # contains cross links etc.
54 fop-filter.pdf: filter.fo PageLabelPDF
55 fop filter.fo -pdf filter-tmp.pdf
56 ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf
59 ### PS/PDF generation using SDoP
62 sdop-filter.ps: filter-pr.xml
63 sdop -o filter.ps filter-pr.xml
65 sdop-filter.pdf: filter.ps
66 ps2pdf filter.ps filter.pdf
69 ### PS/PDF default setting
72 filter.ps: sdop-filter.ps
74 filter.pdf: sdop-filter.pdf
79 filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
80 MyStyle-html.xsl MyStyle.xsl
81 /bin/rm -rf filter.html filter-html.html
82 xmlto -x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml
83 /bin/mv -f filter-html.html filter.html
86 filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
88 /bin/rm -rf filter-txt.html
89 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
90 w3m -dump filter-txt.html | ./Tidytxt >filter.txt
92 # I have not found a way of making docbook2texi write its output anywhere
93 # other than the file name that it makes up. The --to-stdout option does not
96 filter.info: filter-info.xml
97 docbook2texi filter-info.xml
98 perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
99 <exim_filtering.texi | Tidytxt >filter.texinfo
100 /bin/rm -rf exim_filtering.texi
101 makeinfo -o filter.info filter.texinfo
103 ########################################################################
106 ################################ SPEC ##################################
111 spec-pr.xml: spec.xml Pre-xml
112 ./Pre-xml -optbreak <spec.xml >spec-pr.xml
114 spec-html.xml: spec.xml Pre-xml
115 ./Pre-xml -html -oneindex \
116 <spec.xml >spec-html.xml
118 spec-txt.xml: spec.xml Pre-xml
119 ./Pre-xml -ascii -html -noindex -quoteliteral \
120 <spec.xml >spec-txt.xml
122 spec-info.xml: spec.xml Pre-xml
123 ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
125 spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
127 /bin/rm -rf spec.fo spec-pr.fo
128 xmlto -x MyStyle-spec-fo.xsl fo spec-pr.xml
129 /bin/mv -f spec-pr.fo spec.fo
132 ### PS/PDF generation using fop
135 # Do not use pdf2ps from the PDF version; better PS is generated directly.
138 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
139 mv spec-tmp.ps spec.ps
141 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
142 # contains cross links etc. We post-process it to add page label information
143 # so that the page identifiers shown by acroread are the correct page numbers.
145 fop-spec.pdf: spec.fo PageLabelPDF
146 FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
147 ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
150 ### PS/PDF generation using SDoP
153 sdop-spec.ps: spec-pr.xml
154 sdop -o spec.ps spec-pr.xml
156 sdop-spec.pdf: spec.ps
157 ps2pdf spec.ps spec.pdf
160 ### PS/PDF default setting
163 spec.ps: sdop-spec.ps
165 spec.pdf: sdop-spec.pdf
170 spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
171 MyStyle-html.xsl MyStyle.xsl
172 /bin/rm -rf spec_html
173 xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml
176 spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
178 /bin/rm -rf spec-txt.html
179 xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
180 w3m -dump spec-txt.html | ./Tidytxt >spec.txt
182 # I have not found a way of making docbook2texi write its output anywhere
183 # other than the file name that it makes up. The --to-stdout option does not
186 spec.info: spec-info.xml
187 docbook2texi spec-info.xml
188 ./TidyInfo <the_exim_mta.texi >spec.texinfo
189 /bin/rm -rf the_exim_mta.texi
190 makeinfo -o spec.info spec.texinfo
192 ########################################################################
195 ################################ TEST ##################################
197 # These targets (similar to the above) are for running little tests.
202 test-pr.xml: test.xml Pre-xml
203 ./Pre-xml <test.xml >test-pr.xml
205 test-html.xml: test.xml Pre-xml
206 ./Pre-xml -html -oneindex <test.xml >test-html.xml
208 test-txt.xml: test.xml Pre-xml
209 ./Pre-xml -ascii -html -noindex -quoteinfo \
210 <test.xml >test-txt.xml
212 test-info.xml: test.xml Pre-xml
213 ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
215 test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
217 /bin/rm -rf test.fo test-pr.fo
218 xmlto -x MyStyle-spec-fo.xsl fo test-pr.xml
219 /bin/mv -f test-pr.fo test.fo
222 ### PS/PDF generation using fop
225 # Do not use pdf2ps from the PDF version; better PS is generated directly.
228 fop test.fo -ps test-tmp.ps
229 mv test-tmp.ps test.ps
231 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
232 # contains cross links etc.
234 fop-test.pdf: test.fo
235 fop test.fo -pdf test-tmp.pdf
236 mv test-tmp.pdf test.pdf
239 ### PS/PDF generation using SDoP
242 sdop-test.ps: test-pr.xml
243 sdop -o test.ps test-pr.xml
245 sdop-test.pdf: test.ps
246 ps2pdf test.ps test.pdf
249 ### PS/PDF default setting
252 test.ps: sdop-test.ps
254 test.pdf: sdop-test.pdf
260 test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
262 /bin/rm -rf test.html test-html.html
263 xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
264 /bin/mv -f test-html.html test.html
266 test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
268 /bin/rm -rf test-txt.html
269 xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
270 w3m -dump test-txt.html | Tidytxt >test.txt
272 # I have not found a way of making docbook2texi write its output anywhere
273 # other than the file name that it makes up. The --to-stdout option does not
276 test.info: test-info.xml
277 docbook2texi test-info.xml
278 ./TidyInfo <short_title.texi >test.texinfo
279 /bin/rm -rf short_title.texi
280 makeinfo -o test.info test.texinfo
282 ########################################################################
285 ################################ CLEAN #################################
287 clean:; /bin/rm -rf exim.8 \
288 filter*.xml spec*.xml test*.xml \
289 *.fo *.html *.pdf *.ps \
290 filter*.txt spec*.txt test*.txt \
291 *.info* *.texinfo *.texi
293 ########################################################################