1 # Make file for Exim documentation from xfpt source.
3 notarget
:; @echo
"** You must specify a target, in the form x.y, where x is 'filter', 'spec',"
4 @echo
"** or 'test', and y is 'xml', 'fo', 'ps', 'pdf', 'html', 'txt', or 'info'."
5 @echo
"** One other possible target is 'exim.8'".
9 ############################# EVERYTHING ###############################
11 # Generate all the documentation files...
13 ## removed info files as I cannot generate them - spec.info filter.info
14 ## removed html files as superceded by new website code
15 everything
: spec.pdf spec.ps spec.txt \
16 filter.pdf
filter.ps
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-txt.xml
: filter.xml Pre-xml
36 .
/Pre-xml
-ascii
-html
-quoteliteral
<filter.xml
>filter-txt.xml
38 filter-info.xml
: filter.xml Pre-xml
39 .
/Pre-xml
-ascii
-html
<filter.xml
>filter-info.xml
41 filter.fo
: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
42 /bin
/rm -rf
filter.fo filter-pr.fo
43 xmlto
-x MyStyle-filter-fo.xsl fo filter-pr.xml
44 /bin
/mv
-f filter-pr.fo
filter.fo
46 # Do not use pdf2ps from the PDF version; better PS is generated directly.
49 ### PS/PDF generation using fop
52 fop-filter.ps
: filter.fo
53 fop
filter.fo
-ps filter-tmp.ps
54 mv filter-tmp.ps
filter.ps
56 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
57 # contains cross links etc.
59 fop-filter.pdf
: filter.fo PageLabelPDF
60 fop
filter.fo
-pdf filter-tmp.pdf
61 .
/PageLabelPDF
2 <filter-tmp.pdf
>filter.pdf
64 ### PS/PDF generation using SDoP
67 sdop-filter.ps
: filter-pr.xml
68 sdop
-o
filter.ps filter-pr.xml
70 sdop-filter.pdf
: filter.ps
71 ps2pdf
filter.ps
filter.pdf
74 ### PS/PDF default setting
77 filter.ps
: sdop-filter.ps
79 filter.pdf
: sdop-filter.pdf
84 filter.txt
: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
86 /bin
/rm -rf filter-txt.html
87 xmlto
-x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
88 w3m
-dump filter-txt.html | .
/Tidytxt
>filter.txt
89 .
/SanityTestText
filter.txt
91 # I have not found a way of making docbook2texi write its output anywhere
92 # other than the file name that it makes up. The --to-stdout option does not
95 filter.
info: filter-info.xml
96 docbook2texi filter-info.xml
97 perl
-ne
's/conceptindex/cindex/;s/optionindex/findex/;print;' \
98 <exim_filtering.texi | .
/Tidytxt
>filter.texinfo
99 /bin
/rm -rf exim_filtering.texi
100 makeinfo -o
filter.
info filter.texinfo
102 ########################################################################
105 ################################ SPEC ##################################
110 spec-pr.xml
: spec.xml Pre-xml
111 .
/Pre-xml
-optbreak
<spec.xml
>spec-pr.xml
113 spec-txt.xml
: spec.xml Pre-xml
114 .
/Pre-xml
-ascii
-html
-noindex
-quoteliteral \
115 <spec.xml
>spec-txt.xml
117 spec-info.xml
: spec.xml Pre-xml
118 .
/Pre-xml
-ascii
-html
-noindex
<spec.xml
>spec-info.xml
120 spec.fo
: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
122 /bin
/rm -rf spec.fo spec-pr.fo
123 xmlto
-x MyStyle-spec-fo.xsl fo spec-pr.xml
124 /bin
/mv
-f spec-pr.fo spec.fo
127 ### PS/PDF generation using fop
130 # Do not use pdf2ps from the PDF version; better PS is generated directly.
133 FOP_OPTS
=-Xmx512m fop spec.fo
-ps spec-tmp.ps
134 mv spec-tmp.ps spec.ps
136 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
137 # contains cross links etc. We post-process it to add page label information
138 # so that the page identifiers shown by acroread are the correct page numbers.
140 fop-spec.pdf
: spec.fo PageLabelPDF
141 FOP_OPTS
=-Xmx512m fop spec.fo
-pdf spec-tmp.pdf
142 .
/PageLabelPDF
12 <spec-tmp.pdf
>spec.pdf
145 ### PS/PDF generation using SDoP
148 sdop-spec.ps
: spec-pr.xml
149 sdop
-o spec.ps spec-pr.xml
151 sdop-spec.pdf
: spec.ps
152 ps2pdf spec.ps spec.pdf
155 ### PS/PDF default setting
158 spec.ps
: sdop-spec.ps
160 spec.pdf
: sdop-spec.pdf
165 spec.txt
: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
167 /bin
/rm -rf spec-txt.html
168 xmlto
-x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
169 w3m
-dump spec-txt.html | .
/Tidytxt
>spec.txt
170 .
/SanityTestText spec.txt
172 # I have not found a way of making docbook2texi write its output anywhere
173 # other than the file name that it makes up. The --to-stdout option does not
176 spec.
info: spec-info.xml
177 docbook2texi spec-info.xml
178 .
/TidyInfo
<the_exim_mta.texi
>spec.texinfo
179 /bin
/rm -rf the_exim_mta.texi
180 makeinfo -o spec.
info --no-split spec.texinfo
182 ########################################################################
185 ################################ TEST ##################################
187 # These targets (similar to the above) are for running little tests.
192 test-pr.xml
: test.xml Pre-xml
193 .
/Pre-xml
<test.xml
>test-pr.xml
195 test-html.xml
: test.xml Pre-xml
196 .
/Pre-xml
-html
-oneindex
<test.xml
>test-html.xml
198 test-txt.xml
: test.xml Pre-xml
199 .
/Pre-xml
-ascii
-html
-noindex
-quoteinfo \
200 <test.xml
>test-txt.xml
202 test-info.xml
: test.xml Pre-xml
203 .
/Pre-xml
-ascii
-html
-noindex
<test.xml
>test-info.xml
205 test.fo
: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
207 /bin
/rm -rf
test.fo test-pr.fo
208 xmlto
-x MyStyle-spec-fo.xsl fo test-pr.xml
209 /bin
/mv
-f test-pr.fo
test.fo
212 ### PS/PDF generation using fop
215 # Do not use pdf2ps from the PDF version; better PS is generated directly.
218 fop
test.fo
-ps test-tmp.ps
219 mv test-tmp.ps
test.ps
221 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
222 # contains cross links etc.
224 fop-test.pdf
: test.fo
225 fop
test.fo
-pdf test-tmp.pdf
226 mv test-tmp.pdf
test.pdf
229 ### PS/PDF generation using SDoP
232 sdop-test.ps
: test-pr.xml
233 sdop
-o
test.ps test-pr.xml
235 sdop-test.pdf
: test.ps
236 ps2pdf
test.ps
test.pdf
239 ### PS/PDF default setting
242 test.ps
: sdop-test.ps
244 test.pdf
: sdop-test.pdf
250 test.txt
: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
252 /bin
/rm -rf test-txt.html
253 xmlto
-x MyStyle-txt-html.xsl html-nochunks test-txt.xml
254 w3m
-dump test-txt.html | Tidytxt
>test.txt
256 # I have not found a way of making docbook2texi write its output anywhere
257 # other than the file name that it makes up. The --to-stdout option does not
260 test.
info: test-info.xml
261 docbook2texi test-info.xml
262 .
/TidyInfo
<short_title.texi
>test.texinfo
263 /bin
/rm -rf short_title.texi
264 makeinfo -o
test.
info test.texinfo
266 ########################################################################
269 ############################## OS FIXUP ################################
271 # Yes, we've advanced so far in text processing that we now have to
272 # hardcode in complete paths and so become dependent upon exactly where
273 # files were installed for xsl:import. Which of course varies by OS.
278 ########################################################################
281 ################################ CLEAN #################################
283 clean:; /bin
/rm -rf exim
.8 \
284 filter*.xml spec
*.xml
test*.xml \
285 *.fo
*.html
*.pdf
*.ps \
286 filter*.txt spec
*.txt
test*.txt \
287 *.
info* *.texinfo
*.texi
289 ########################################################################