1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.13 2009/10/16 10:36:52 nm4 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 ############################# EVERYTHING ###############################
13 # Generate all the documentation files...
15 everything
: spec.pdf spec.ps spec.html spec.
info spec.txt \
16 filter.pdf
filter.ps
filter.html
filter.
info filter.txt \
19 ############################## MAN PAGE ################################
21 exim
.8: spec.xml x2man
24 ########################################################################
27 ############################### FILTER #################################
29 filter.xml
: filter.xfpt
32 filter-pr.xml
: filter.xml Pre-xml
33 .
/Pre-xml
-bookinfo
<filter.xml
>filter-pr.xml
35 filter-html.xml
: filter.xml Pre-xml
36 .
/Pre-xml
-html
<filter.xml
>filter-html.xml
38 filter-txt.xml
: filter.xml Pre-xml
39 .
/Pre-xml
-ascii
-html
-quoteliteral
<filter.xml
>filter-txt.xml
41 filter-info.xml
: filter.xml Pre-xml
42 .
/Pre-xml
-ascii
-html
<filter.xml
>filter-info.xml
44 filter.fo
: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
45 /bin
/rm -rf
filter.fo filter-pr.fo
46 xmlto
-x MyStyle-filter-fo.xsl fo filter-pr.xml
47 /bin
/mv
-f filter-pr.fo
filter.fo
49 # Do not use pdf2ps from the PDF version; better PS is generated directly.
52 ### PS/PDF generation using fop
55 fop-filter.ps
: filter.fo
56 fop
filter.fo
-ps filter-tmp.ps
57 mv filter-tmp.ps
filter.ps
59 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
60 # contains cross links etc.
62 fop-filter.pdf
: filter.fo PageLabelPDF
63 fop
filter.fo
-pdf filter-tmp.pdf
64 .
/PageLabelPDF
2 <filter-tmp.pdf
>filter.pdf
67 ### PS/PDF generation using SDoP
70 sdop-filter.ps
: filter-pr.xml
71 sdop
-o
filter.ps filter-pr.xml
73 sdop-filter.pdf
: filter.ps
74 ps2pdf
filter.ps
filter.pdf
77 ### PS/PDF default setting
80 filter.ps
: sdop-filter.ps
82 filter.pdf
: sdop-filter.pdf
87 filter.html
: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
88 MyStyle-html.xsl MyStyle.xsl
89 /bin
/rm -rf
filter.html filter-html.html
90 xmlto
-x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml
91 /bin
/mv
-f filter-html.html
filter.html
94 filter.txt
: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
96 /bin
/rm -rf filter-txt.html
97 xmlto
-x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
98 w3m
-dump filter-txt.html | .
/Tidytxt
>filter.txt
100 # I have not found a way of making docbook2texi write its output anywhere
101 # other than the file name that it makes up. The --to-stdout option does not
104 filter.
info: filter-info.xml
105 docbook2texi filter-info.xml
106 perl
-ne
's/conceptindex/cindex/;s/optionindex/findex/;print;' \
107 <exim_filtering.texi | .
/Tidytxt
>filter.texinfo
108 /bin
/rm -rf exim_filtering.texi
109 makeinfo -o
filter.
info filter.texinfo
111 ########################################################################
114 ################################ SPEC ##################################
119 spec-pr.xml
: spec.xml Pre-xml
120 .
/Pre-xml
-optbreak
<spec.xml
>spec-pr.xml
122 spec-html.xml
: spec.xml Pre-xml
123 .
/Pre-xml
-html
-oneindex \
124 <spec.xml
>spec-html.xml
126 spec-txt.xml
: spec.xml Pre-xml
127 .
/Pre-xml
-ascii
-html
-noindex
-quoteliteral \
128 <spec.xml
>spec-txt.xml
130 spec-info.xml
: spec.xml Pre-xml
131 .
/Pre-xml
-ascii
-html
-noindex
<spec.xml
>spec-info.xml
133 spec.fo
: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
135 /bin
/rm -rf spec.fo spec-pr.fo
136 xmlto
-x MyStyle-spec-fo.xsl fo spec-pr.xml
137 /bin
/mv
-f spec-pr.fo spec.fo
140 ### PS/PDF generation using fop
143 # Do not use pdf2ps from the PDF version; better PS is generated directly.
146 FOP_OPTS
=-Xmx512m fop spec.fo
-ps spec-tmp.ps
147 mv spec-tmp.ps spec.ps
149 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
150 # contains cross links etc. We post-process it to add page label information
151 # so that the page identifiers shown by acroread are the correct page numbers.
153 fop-spec.pdf
: spec.fo PageLabelPDF
154 FOP_OPTS
=-Xmx512m fop spec.fo
-pdf spec-tmp.pdf
155 .
/PageLabelPDF
12 <spec-tmp.pdf
>spec.pdf
158 ### PS/PDF generation using SDoP
161 sdop-spec.ps
: spec-pr.xml
162 sdop
-o spec.ps spec-pr.xml
164 sdop-spec.pdf
: spec.ps
165 ps2pdf spec.ps spec.pdf
168 ### PS/PDF default setting
171 spec.ps
: sdop-spec.ps
173 spec.pdf
: sdop-spec.pdf
178 spec.html
: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
179 MyStyle-html.xsl MyStyle.xsl
180 /bin
/rm -rf spec_html
181 xmlto
-x MyStyle-chunk-html.xsl
-o spec_html html spec-html.xml
184 spec.txt
: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
186 /bin
/rm -rf spec-txt.html
187 xmlto
-x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
188 w3m
-dump spec-txt.html | .
/Tidytxt
>spec.txt
190 # I have not found a way of making docbook2texi write its output anywhere
191 # other than the file name that it makes up. The --to-stdout option does not
194 spec.
info: spec-info.xml
195 docbook2texi spec-info.xml
196 .
/TidyInfo
<the_exim_mta.texi
>spec.texinfo
197 /bin
/rm -rf the_exim_mta.texi
198 makeinfo -o spec.
info --no-split spec.texinfo
200 ########################################################################
203 ################################ TEST ##################################
205 # These targets (similar to the above) are for running little tests.
210 test-pr.xml
: test.xml Pre-xml
211 .
/Pre-xml
<test.xml
>test-pr.xml
213 test-html.xml
: test.xml Pre-xml
214 .
/Pre-xml
-html
-oneindex
<test.xml
>test-html.xml
216 test-txt.xml
: test.xml Pre-xml
217 .
/Pre-xml
-ascii
-html
-noindex
-quoteinfo \
218 <test.xml
>test-txt.xml
220 test-info.xml
: test.xml Pre-xml
221 .
/Pre-xml
-ascii
-html
-noindex
<test.xml
>test-info.xml
223 test.fo
: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
225 /bin
/rm -rf
test.fo test-pr.fo
226 xmlto
-x MyStyle-spec-fo.xsl fo test-pr.xml
227 /bin
/mv
-f test-pr.fo
test.fo
230 ### PS/PDF generation using fop
233 # Do not use pdf2ps from the PDF version; better PS is generated directly.
236 fop
test.fo
-ps test-tmp.ps
237 mv test-tmp.ps
test.ps
239 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
240 # contains cross links etc.
242 fop-test.pdf
: test.fo
243 fop
test.fo
-pdf test-tmp.pdf
244 mv test-tmp.pdf
test.pdf
247 ### PS/PDF generation using SDoP
250 sdop-test.ps
: test-pr.xml
251 sdop
-o
test.ps test-pr.xml
253 sdop-test.pdf
: test.ps
254 ps2pdf
test.ps
test.pdf
257 ### PS/PDF default setting
260 test.ps
: sdop-test.ps
262 test.pdf
: sdop-test.pdf
268 test.html
: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
270 /bin
/rm -rf
test.html test-html.html
271 xmlto
-x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
272 /bin
/mv
-f test-html.html
test.html
274 test.txt
: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
276 /bin
/rm -rf test-txt.html
277 xmlto
-x MyStyle-txt-html.xsl html-nochunks test-txt.xml
278 w3m
-dump test-txt.html | Tidytxt
>test.txt
280 # I have not found a way of making docbook2texi write its output anywhere
281 # other than the file name that it makes up. The --to-stdout option does not
284 test.
info: test-info.xml
285 docbook2texi test-info.xml
286 .
/TidyInfo
<short_title.texi
>test.texinfo
287 /bin
/rm -rf short_title.texi
288 makeinfo -o
test.
info test.texinfo
290 ########################################################################
293 ############################## OS FIXUP ################################
295 # Yes, we've advanced so far in text processing that we now have to
296 # hardcode in complete paths and so become dependent upon exactly where
297 # files were installed for xsl:import. Which of course varies by OS.
302 ########################################################################
305 ################################ CLEAN #################################
307 clean:; /bin
/rm -rf exim
.8 \
308 filter*.xml spec
*.xml
test*.xml \
309 *.fo
*.html
*.pdf
*.ps \
310 filter*.txt spec
*.txt
test*.txt \
311 *.
info* *.texinfo
*.texi
313 ########################################################################