Commit | Line | Data |
---|---|---|
4aa45c31 | 1 | # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.10 2007/04/17 13:06:09 ph10 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 | ||
11 | ############################## MAN PAGE ################################ | |
12 | ||
9b371988 | 13 | exim.8: spec.xml x2man |
168e428f PH |
14 | ./x2man |
15 | ||
16 | ######################################################################## | |
17 | ||
18 | ||
19 | ############################### FILTER ################################# | |
20 | ||
f89d2485 PH |
21 | filter.xml: filter.xfpt |
22 | xfpt filter.xfpt | |
168e428f | 23 | |
f89d2485 PH |
24 | filter-pr.xml: filter.xml Pre-xml |
25 | ./Pre-xml -bookinfo <filter.xml >filter-pr.xml | |
168e428f PH |
26 | |
27 | filter-html.xml: filter.xml Pre-xml | |
f89d2485 | 28 | ./Pre-xml -html <filter.xml >filter-html.xml |
168e428f | 29 | |
f89d2485 PH |
30 | filter-txt.xml: filter.xml Pre-xml |
31 | ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml | |
9b371988 PH |
32 | |
33 | filter-info.xml: filter.xml Pre-xml | |
f89d2485 | 34 | ./Pre-xml -ascii -html <filter.xml >filter-info.xml |
168e428f | 35 | |
f89d2485 PH |
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 | |
168e428f | 40 | |
deca074a PH |
41 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
42 | ||
f89d2485 PH |
43 | ### |
44 | ### PS/PDF generation using fop | |
45 | ### | |
46 | ||
47 | fop-filter.ps: filter.fo | |
48 | fop filter.fo -ps filter-tmp.ps | |
49 | mv filter-tmp.ps filter.ps | |
168e428f | 50 | |
deca074a PH |
51 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
52 | # contains cross links etc. | |
d1e83bff | 53 | |
f89d2485 PH |
54 | fop-filter.pdf: filter.fo PageLabelPDF |
55 | fop filter.fo -pdf filter-tmp.pdf | |
56 | ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf | |
57 | ||
58 | ### | |
59 | ### PS/PDF generation using SDoP | |
60 | ### | |
61 | ||
62 | sdop-filter.ps: filter-pr.xml | |
63 | sdop -o filter.ps filter-pr.xml | |
64 | ||
4aa45c31 | 65 | sdop-filter.pdf: filter.ps |
f89d2485 PH |
66 | ps2pdf filter.ps filter.pdf |
67 | ||
68 | ### | |
69 | ### PS/PDF default setting | |
70 | ### | |
71 | ||
72 | filter.ps: sdop-filter.ps | |
73 | ||
74 | filter.pdf: sdop-filter.pdf | |
75 | ||
76 | ### | |
77 | ### | |
168e428f | 78 | |
9b371988 PH |
79 | filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \ |
80 | MyStyle-html.xsl MyStyle.xsl | |
168e428f PH |
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 | |
068aaea8 | 84 | ./TidyHTML-filter |
168e428f | 85 | |
9b371988 PH |
86 | filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
87 | MyStyle.xsl | |
168e428f PH |
88 | /bin/rm -rf filter-txt.html |
89 | xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml | |
9b371988 | 90 | w3m -dump filter-txt.html | ./Tidytxt >filter.txt |
168e428f PH |
91 | |
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 | |
94 | # work. | |
95 | ||
9b371988 PH |
96 | filter.info: filter-info.xml |
97 | docbook2texi filter-info.xml | |
168e428f PH |
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 | |
102 | ||
103 | ######################################################################## | |
104 | ||
105 | ||
106 | ################################ SPEC ################################## | |
107 | ||
f89d2485 PH |
108 | spec.xml: spec.xfpt |
109 | xfpt spec.xfpt | |
168e428f | 110 | |
f89d2485 PH |
111 | spec-pr.xml: spec.xml Pre-xml |
112 | ./Pre-xml -optbreak <spec.xml >spec-pr.xml | |
168e428f PH |
113 | |
114 | spec-html.xml: spec.xml Pre-xml | |
f89d2485 PH |
115 | ./Pre-xml -html -oneindex \ |
116 | <spec.xml >spec-html.xml | |
168e428f | 117 | |
f89d2485 PH |
118 | spec-txt.xml: spec.xml Pre-xml |
119 | ./Pre-xml -ascii -html -noindex -quoteliteral \ | |
120 | <spec.xml >spec-txt.xml | |
9b371988 PH |
121 | |
122 | spec-info.xml: spec.xml Pre-xml | |
f89d2485 PH |
123 | ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml |
124 | ||
125 | spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \ | |
126 | MyTitleStyle.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 | |
168e428f | 130 | |
f89d2485 PH |
131 | ### |
132 | ### PS/PDF generation using fop | |
133 | ### | |
168e428f | 134 | |
deca074a PH |
135 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
136 | ||
f89d2485 | 137 | fop-spec.ps: spec.fo |
068aaea8 PH |
138 | FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps |
139 | mv spec-tmp.ps spec.ps | |
168e428f | 140 | |
deca074a | 141 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
9b371988 PH |
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. | |
d1e83bff | 144 | |
f89d2485 | 145 | fop-spec.pdf: spec.fo PageLabelPDF |
deca074a | 146 | FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf |
4f578862 | 147 | ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf |
168e428f | 148 | |
f89d2485 PH |
149 | ### |
150 | ### PS/PDF generation using SDoP | |
151 | ### | |
152 | ||
153 | sdop-spec.ps: spec-pr.xml | |
154 | sdop -o spec.ps spec-pr.xml | |
155 | ||
4aa45c31 | 156 | sdop-spec.pdf: spec.ps |
f89d2485 PH |
157 | ps2pdf spec.ps spec.pdf |
158 | ||
159 | ### | |
160 | ### PS/PDF default setting | |
161 | ### | |
162 | ||
163 | spec.ps: sdop-spec.ps | |
164 | ||
165 | spec.pdf: sdop-spec.pdf | |
166 | ||
167 | ### | |
168 | ### | |
169 | ||
9b371988 PH |
170 | spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \ |
171 | MyStyle-html.xsl MyStyle.xsl | |
4f578862 PH |
172 | /bin/rm -rf spec_html |
173 | xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml | |
168e428f PH |
174 | ./TidyHTML-spec |
175 | ||
9b371988 PH |
176 | spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
177 | MyStyle.xsl | |
168e428f PH |
178 | /bin/rm -rf spec-txt.html |
179 | xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml | |
9b371988 | 180 | w3m -dump spec-txt.html | ./Tidytxt >spec.txt |
168e428f PH |
181 | |
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 | |
184 | # work. | |
185 | ||
9b371988 PH |
186 | spec.info: spec-info.xml |
187 | docbook2texi spec-info.xml | |
4f578862 | 188 | ./TidyInfo <the_exim_mta.texi >spec.texinfo |
168e428f PH |
189 | /bin/rm -rf the_exim_mta.texi |
190 | makeinfo -o spec.info spec.texinfo | |
191 | ||
192 | ######################################################################## | |
193 | ||
194 | ||
195 | ################################ TEST ################################## | |
196 | ||
197 | # These targets (similar to the above) are for running little tests. | |
198 | ||
9b371988 PH |
199 | test.xml: test.xfpt |
200 | xfpt test.xfpt | |
168e428f | 201 | |
f89d2485 PH |
202 | test-pr.xml: test.xml Pre-xml |
203 | ./Pre-xml <test.xml >test-pr.xml | |
168e428f PH |
204 | |
205 | test-html.xml: test.xml Pre-xml | |
9b371988 | 206 | ./Pre-xml -html -oneindex <test.xml >test-html.xml |
168e428f PH |
207 | |
208 | test-txt.xml: test.xml Pre-xml | |
9b371988 PH |
209 | ./Pre-xml -ascii -html -noindex -quoteinfo \ |
210 | <test.xml >test-txt.xml | |
211 | ||
212 | test-info.xml: test.xml Pre-xml | |
213 | ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml | |
168e428f | 214 | |
f89d2485 | 215 | test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \ |
9b371988 | 216 | MyTitleStyle.xsl |
f89d2485 PH |
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 | |
220 | ||
221 | ### | |
222 | ### PS/PDF generation using fop | |
223 | ### | |
168e428f | 224 | |
deca074a PH |
225 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
226 | ||
f89d2485 | 227 | fop-test.ps: test.fo |
068aaea8 PH |
228 | fop test.fo -ps test-tmp.ps |
229 | mv test-tmp.ps test.ps | |
168e428f | 230 | |
deca074a PH |
231 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
232 | # contains cross links etc. | |
d1e83bff | 233 | |
f89d2485 | 234 | fop-test.pdf: test.fo |
deca074a PH |
235 | fop test.fo -pdf test-tmp.pdf |
236 | mv test-tmp.pdf test.pdf | |
168e428f | 237 | |
f89d2485 PH |
238 | ### |
239 | ### PS/PDF generation using SDoP | |
240 | ### | |
241 | ||
242 | sdop-test.ps: test-pr.xml | |
243 | sdop -o test.ps test-pr.xml | |
244 | ||
4aa45c31 | 245 | sdop-test.pdf: test.ps |
f89d2485 PH |
246 | ps2pdf test.ps test.pdf |
247 | ||
248 | ### | |
249 | ### PS/PDF default setting | |
250 | ### | |
251 | ||
252 | test.ps: sdop-test.ps | |
253 | ||
254 | test.pdf: sdop-test.pdf | |
255 | ||
256 | ### | |
257 | ### | |
258 | ||
259 | ||
9b371988 PH |
260 | test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \ |
261 | MyStyle.xsl | |
168e428f PH |
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 | |
265 | ||
9b371988 PH |
266 | test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
267 | MyStyle.xsl | |
168e428f PH |
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 | |
271 | ||
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 | |
274 | # work. | |
275 | ||
9b371988 PH |
276 | test.info: test-info.xml |
277 | docbook2texi test-info.xml | |
4f578862 | 278 | ./TidyInfo <short_title.texi >test.texinfo |
168e428f PH |
279 | /bin/rm -rf short_title.texi |
280 | makeinfo -o test.info test.texinfo | |
281 | ||
282 | ######################################################################## | |
283 | ||
284 | ||
285 | ################################ CLEAN ################################# | |
286 | ||
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 | |
292 | ||
293 | ######################################################################## |