Commit | Line | Data |
---|---|---|
a2119650 | 1 | # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.13 2009/10/16 10:36:52 nm4 Exp $ |
168e428f | 2 | |
9b371988 | 3 | # Make file for Exim documentation from xfpt source. |
168e428f PH |
4 | |
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'". | |
8 | exit 1 | |
9 | ||
10 | ||
207c78ae NM |
11 | ############################# EVERYTHING ############################### |
12 | # | |
13 | # Generate all the documentation files... | |
14 | # | |
15 | everything: spec.pdf spec.ps spec.html spec.info spec.txt \ | |
16 | filter.pdf filter.ps filter.html filter.info filter.txt \ | |
17 | exim.8 | |
18 | ||
168e428f PH |
19 | ############################## MAN PAGE ################################ |
20 | ||
9b371988 | 21 | exim.8: spec.xml x2man |
168e428f PH |
22 | ./x2man |
23 | ||
24 | ######################################################################## | |
25 | ||
26 | ||
27 | ############################### FILTER ################################# | |
28 | ||
f89d2485 PH |
29 | filter.xml: filter.xfpt |
30 | xfpt filter.xfpt | |
168e428f | 31 | |
f89d2485 PH |
32 | filter-pr.xml: filter.xml Pre-xml |
33 | ./Pre-xml -bookinfo <filter.xml >filter-pr.xml | |
168e428f PH |
34 | |
35 | filter-html.xml: filter.xml Pre-xml | |
f89d2485 | 36 | ./Pre-xml -html <filter.xml >filter-html.xml |
168e428f | 37 | |
f89d2485 PH |
38 | filter-txt.xml: filter.xml Pre-xml |
39 | ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml | |
9b371988 PH |
40 | |
41 | filter-info.xml: filter.xml Pre-xml | |
f89d2485 | 42 | ./Pre-xml -ascii -html <filter.xml >filter-info.xml |
168e428f | 43 | |
f89d2485 PH |
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 | |
168e428f | 48 | |
deca074a PH |
49 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
50 | ||
f89d2485 PH |
51 | ### |
52 | ### PS/PDF generation using fop | |
53 | ### | |
54 | ||
55 | fop-filter.ps: filter.fo | |
56 | fop filter.fo -ps filter-tmp.ps | |
57 | mv filter-tmp.ps filter.ps | |
168e428f | 58 | |
deca074a PH |
59 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
60 | # contains cross links etc. | |
d1e83bff | 61 | |
f89d2485 PH |
62 | fop-filter.pdf: filter.fo PageLabelPDF |
63 | fop filter.fo -pdf filter-tmp.pdf | |
64 | ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf | |
65 | ||
66 | ### | |
67 | ### PS/PDF generation using SDoP | |
68 | ### | |
69 | ||
70 | sdop-filter.ps: filter-pr.xml | |
71 | sdop -o filter.ps filter-pr.xml | |
72 | ||
4aa45c31 | 73 | sdop-filter.pdf: filter.ps |
f89d2485 PH |
74 | ps2pdf filter.ps filter.pdf |
75 | ||
76 | ### | |
77 | ### PS/PDF default setting | |
78 | ### | |
79 | ||
80 | filter.ps: sdop-filter.ps | |
81 | ||
82 | filter.pdf: sdop-filter.pdf | |
83 | ||
84 | ### | |
85 | ### | |
168e428f | 86 | |
9b371988 PH |
87 | filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \ |
88 | MyStyle-html.xsl MyStyle.xsl | |
168e428f PH |
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 | |
068aaea8 | 92 | ./TidyHTML-filter |
168e428f | 93 | |
9b371988 PH |
94 | filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
95 | MyStyle.xsl | |
168e428f PH |
96 | /bin/rm -rf filter-txt.html |
97 | xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml | |
9b371988 | 98 | w3m -dump filter-txt.html | ./Tidytxt >filter.txt |
168e428f PH |
99 | |
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 | |
102 | # work. | |
103 | ||
9b371988 PH |
104 | filter.info: filter-info.xml |
105 | docbook2texi filter-info.xml | |
168e428f | 106 | perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \ |
207c78ae | 107 | <exim_filtering.texi | ./Tidytxt >filter.texinfo |
168e428f PH |
108 | /bin/rm -rf exim_filtering.texi |
109 | makeinfo -o filter.info filter.texinfo | |
110 | ||
111 | ######################################################################## | |
112 | ||
113 | ||
114 | ################################ SPEC ################################## | |
115 | ||
f89d2485 PH |
116 | spec.xml: spec.xfpt |
117 | xfpt spec.xfpt | |
168e428f | 118 | |
f89d2485 PH |
119 | spec-pr.xml: spec.xml Pre-xml |
120 | ./Pre-xml -optbreak <spec.xml >spec-pr.xml | |
168e428f PH |
121 | |
122 | spec-html.xml: spec.xml Pre-xml | |
f89d2485 PH |
123 | ./Pre-xml -html -oneindex \ |
124 | <spec.xml >spec-html.xml | |
168e428f | 125 | |
f89d2485 PH |
126 | spec-txt.xml: spec.xml Pre-xml |
127 | ./Pre-xml -ascii -html -noindex -quoteliteral \ | |
128 | <spec.xml >spec-txt.xml | |
9b371988 PH |
129 | |
130 | spec-info.xml: spec.xml Pre-xml | |
f89d2485 PH |
131 | ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml |
132 | ||
133 | spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \ | |
134 | MyTitleStyle.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 | |
168e428f | 138 | |
f89d2485 PH |
139 | ### |
140 | ### PS/PDF generation using fop | |
141 | ### | |
168e428f | 142 | |
deca074a PH |
143 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
144 | ||
f89d2485 | 145 | fop-spec.ps: spec.fo |
068aaea8 PH |
146 | FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps |
147 | mv spec-tmp.ps spec.ps | |
168e428f | 148 | |
deca074a | 149 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
9b371988 PH |
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. | |
d1e83bff | 152 | |
f89d2485 | 153 | fop-spec.pdf: spec.fo PageLabelPDF |
deca074a | 154 | FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf |
4f578862 | 155 | ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf |
168e428f | 156 | |
f89d2485 PH |
157 | ### |
158 | ### PS/PDF generation using SDoP | |
159 | ### | |
160 | ||
161 | sdop-spec.ps: spec-pr.xml | |
162 | sdop -o spec.ps spec-pr.xml | |
163 | ||
4aa45c31 | 164 | sdop-spec.pdf: spec.ps |
f89d2485 PH |
165 | ps2pdf spec.ps spec.pdf |
166 | ||
167 | ### | |
168 | ### PS/PDF default setting | |
169 | ### | |
170 | ||
171 | spec.ps: sdop-spec.ps | |
172 | ||
173 | spec.pdf: sdop-spec.pdf | |
174 | ||
175 | ### | |
176 | ### | |
177 | ||
9b371988 PH |
178 | spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \ |
179 | MyStyle-html.xsl MyStyle.xsl | |
4f578862 PH |
180 | /bin/rm -rf spec_html |
181 | xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml | |
168e428f PH |
182 | ./TidyHTML-spec |
183 | ||
9b371988 PH |
184 | spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
185 | MyStyle.xsl | |
168e428f PH |
186 | /bin/rm -rf spec-txt.html |
187 | xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml | |
9b371988 | 188 | w3m -dump spec-txt.html | ./Tidytxt >spec.txt |
168e428f PH |
189 | |
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 | |
192 | # work. | |
193 | ||
9b371988 PH |
194 | spec.info: spec-info.xml |
195 | docbook2texi spec-info.xml | |
4f578862 | 196 | ./TidyInfo <the_exim_mta.texi >spec.texinfo |
168e428f | 197 | /bin/rm -rf the_exim_mta.texi |
595028e4 | 198 | makeinfo -o spec.info --no-split spec.texinfo |
168e428f PH |
199 | |
200 | ######################################################################## | |
201 | ||
202 | ||
203 | ################################ TEST ################################## | |
204 | ||
205 | # These targets (similar to the above) are for running little tests. | |
206 | ||
9b371988 PH |
207 | test.xml: test.xfpt |
208 | xfpt test.xfpt | |
168e428f | 209 | |
f89d2485 PH |
210 | test-pr.xml: test.xml Pre-xml |
211 | ./Pre-xml <test.xml >test-pr.xml | |
168e428f PH |
212 | |
213 | test-html.xml: test.xml Pre-xml | |
9b371988 | 214 | ./Pre-xml -html -oneindex <test.xml >test-html.xml |
168e428f PH |
215 | |
216 | test-txt.xml: test.xml Pre-xml | |
9b371988 PH |
217 | ./Pre-xml -ascii -html -noindex -quoteinfo \ |
218 | <test.xml >test-txt.xml | |
219 | ||
220 | test-info.xml: test.xml Pre-xml | |
221 | ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml | |
168e428f | 222 | |
f89d2485 | 223 | test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \ |
9b371988 | 224 | MyTitleStyle.xsl |
f89d2485 PH |
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 | |
228 | ||
229 | ### | |
230 | ### PS/PDF generation using fop | |
231 | ### | |
168e428f | 232 | |
deca074a PH |
233 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
234 | ||
f89d2485 | 235 | fop-test.ps: test.fo |
068aaea8 PH |
236 | fop test.fo -ps test-tmp.ps |
237 | mv test-tmp.ps test.ps | |
168e428f | 238 | |
deca074a PH |
239 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
240 | # contains cross links etc. | |
d1e83bff | 241 | |
f89d2485 | 242 | fop-test.pdf: test.fo |
deca074a PH |
243 | fop test.fo -pdf test-tmp.pdf |
244 | mv test-tmp.pdf test.pdf | |
168e428f | 245 | |
f89d2485 PH |
246 | ### |
247 | ### PS/PDF generation using SDoP | |
248 | ### | |
249 | ||
250 | sdop-test.ps: test-pr.xml | |
251 | sdop -o test.ps test-pr.xml | |
252 | ||
4aa45c31 | 253 | sdop-test.pdf: test.ps |
f89d2485 PH |
254 | ps2pdf test.ps test.pdf |
255 | ||
256 | ### | |
257 | ### PS/PDF default setting | |
258 | ### | |
259 | ||
260 | test.ps: sdop-test.ps | |
261 | ||
262 | test.pdf: sdop-test.pdf | |
263 | ||
264 | ### | |
265 | ### | |
266 | ||
267 | ||
9b371988 PH |
268 | test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \ |
269 | MyStyle.xsl | |
168e428f PH |
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 | |
273 | ||
9b371988 PH |
274 | test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
275 | MyStyle.xsl | |
168e428f PH |
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 | |
279 | ||
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 | |
282 | # work. | |
283 | ||
9b371988 PH |
284 | test.info: test-info.xml |
285 | docbook2texi test-info.xml | |
4f578862 | 286 | ./TidyInfo <short_title.texi >test.texinfo |
168e428f PH |
287 | /bin/rm -rf short_title.texi |
288 | makeinfo -o test.info test.texinfo | |
289 | ||
290 | ######################################################################## | |
291 | ||
292 | ||
a2119650 NM |
293 | ############################## OS FIXUP ################################ |
294 | ||
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. | |
298 | ||
299 | os-fixup: | |
300 | ./OS-Fixups | |
301 | ||
302 | ######################################################################## | |
303 | ||
304 | ||
168e428f PH |
305 | ################################ CLEAN ################################# |
306 | ||
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 | |
312 | ||
313 | ######################################################################## |