Commit | Line | Data |
---|---|---|
4a04fa7a | 1 | # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.14 2010/05/28 15:38:18 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 | # | |
4a04fa7a | 15 | ## removed info files as I cannot generate them - spec.info filter.info |
50023e05 NM |
16 | ## removed html files as superceded by new website code |
17 | everything: spec.pdf spec.ps spec.txt \ | |
18 | filter.pdf filter.ps filter.txt \ | |
207c78ae NM |
19 | exim.8 |
20 | ||
168e428f PH |
21 | ############################## MAN PAGE ################################ |
22 | ||
9b371988 | 23 | exim.8: spec.xml x2man |
168e428f PH |
24 | ./x2man |
25 | ||
26 | ######################################################################## | |
27 | ||
28 | ||
29 | ############################### FILTER ################################# | |
30 | ||
f89d2485 PH |
31 | filter.xml: filter.xfpt |
32 | xfpt filter.xfpt | |
168e428f | 33 | |
f89d2485 PH |
34 | filter-pr.xml: filter.xml Pre-xml |
35 | ./Pre-xml -bookinfo <filter.xml >filter-pr.xml | |
168e428f | 36 | |
f89d2485 PH |
37 | filter-txt.xml: filter.xml Pre-xml |
38 | ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml | |
9b371988 PH |
39 | |
40 | filter-info.xml: filter.xml Pre-xml | |
f89d2485 | 41 | ./Pre-xml -ascii -html <filter.xml >filter-info.xml |
168e428f | 42 | |
f89d2485 PH |
43 | filter.fo: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl |
44 | /bin/rm -rf filter.fo filter-pr.fo | |
45 | xmlto -x MyStyle-filter-fo.xsl fo filter-pr.xml | |
46 | /bin/mv -f filter-pr.fo filter.fo | |
168e428f | 47 | |
deca074a PH |
48 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
49 | ||
f89d2485 PH |
50 | ### |
51 | ### PS/PDF generation using fop | |
52 | ### | |
53 | ||
54 | fop-filter.ps: filter.fo | |
55 | fop filter.fo -ps filter-tmp.ps | |
56 | mv filter-tmp.ps filter.ps | |
168e428f | 57 | |
deca074a PH |
58 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
59 | # contains cross links etc. | |
d1e83bff | 60 | |
f89d2485 PH |
61 | fop-filter.pdf: filter.fo PageLabelPDF |
62 | fop filter.fo -pdf filter-tmp.pdf | |
63 | ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf | |
64 | ||
65 | ### | |
66 | ### PS/PDF generation using SDoP | |
67 | ### | |
68 | ||
69 | sdop-filter.ps: filter-pr.xml | |
70 | sdop -o filter.ps filter-pr.xml | |
71 | ||
4aa45c31 | 72 | sdop-filter.pdf: filter.ps |
f89d2485 PH |
73 | ps2pdf filter.ps filter.pdf |
74 | ||
75 | ### | |
76 | ### PS/PDF default setting | |
77 | ### | |
78 | ||
79 | filter.ps: sdop-filter.ps | |
80 | ||
81 | filter.pdf: sdop-filter.pdf | |
82 | ||
83 | ### | |
84 | ### | |
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 |
b32a9711 | 91 | ./SanityTestText filter.txt |
168e428f PH |
92 | |
93 | # I have not found a way of making docbook2texi write its output anywhere | |
94 | # other than the file name that it makes up. The --to-stdout option does not | |
95 | # work. | |
96 | ||
9b371988 PH |
97 | filter.info: filter-info.xml |
98 | docbook2texi filter-info.xml | |
168e428f | 99 | perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \ |
207c78ae | 100 | <exim_filtering.texi | ./Tidytxt >filter.texinfo |
168e428f PH |
101 | /bin/rm -rf exim_filtering.texi |
102 | makeinfo -o filter.info filter.texinfo | |
103 | ||
104 | ######################################################################## | |
105 | ||
106 | ||
107 | ################################ SPEC ################################## | |
108 | ||
f89d2485 PH |
109 | spec.xml: spec.xfpt |
110 | xfpt spec.xfpt | |
168e428f | 111 | |
f89d2485 PH |
112 | spec-pr.xml: spec.xml Pre-xml |
113 | ./Pre-xml -optbreak <spec.xml >spec-pr.xml | |
168e428f | 114 | |
f89d2485 PH |
115 | spec-txt.xml: spec.xml Pre-xml |
116 | ./Pre-xml -ascii -html -noindex -quoteliteral \ | |
117 | <spec.xml >spec-txt.xml | |
9b371988 PH |
118 | |
119 | spec-info.xml: spec.xml Pre-xml | |
f89d2485 PH |
120 | ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml |
121 | ||
122 | spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \ | |
123 | MyTitleStyle.xsl | |
124 | /bin/rm -rf spec.fo spec-pr.fo | |
125 | xmlto -x MyStyle-spec-fo.xsl fo spec-pr.xml | |
126 | /bin/mv -f spec-pr.fo spec.fo | |
168e428f | 127 | |
f89d2485 PH |
128 | ### |
129 | ### PS/PDF generation using fop | |
130 | ### | |
168e428f | 131 | |
deca074a PH |
132 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
133 | ||
f89d2485 | 134 | fop-spec.ps: spec.fo |
068aaea8 PH |
135 | FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps |
136 | mv spec-tmp.ps spec.ps | |
168e428f | 137 | |
deca074a | 138 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
9b371988 PH |
139 | # contains cross links etc. We post-process it to add page label information |
140 | # so that the page identifiers shown by acroread are the correct page numbers. | |
d1e83bff | 141 | |
f89d2485 | 142 | fop-spec.pdf: spec.fo PageLabelPDF |
deca074a | 143 | FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf |
4f578862 | 144 | ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf |
168e428f | 145 | |
f89d2485 PH |
146 | ### |
147 | ### PS/PDF generation using SDoP | |
148 | ### | |
149 | ||
150 | sdop-spec.ps: spec-pr.xml | |
151 | sdop -o spec.ps spec-pr.xml | |
152 | ||
4aa45c31 | 153 | sdop-spec.pdf: spec.ps |
f89d2485 PH |
154 | ps2pdf spec.ps spec.pdf |
155 | ||
156 | ### | |
157 | ### PS/PDF default setting | |
158 | ### | |
159 | ||
160 | spec.ps: sdop-spec.ps | |
161 | ||
162 | spec.pdf: sdop-spec.pdf | |
163 | ||
164 | ### | |
165 | ### | |
166 | ||
9b371988 PH |
167 | spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
168 | MyStyle.xsl | |
168e428f PH |
169 | /bin/rm -rf spec-txt.html |
170 | xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml | |
9b371988 | 171 | w3m -dump spec-txt.html | ./Tidytxt >spec.txt |
b32a9711 | 172 | ./SanityTestText spec.txt |
168e428f PH |
173 | |
174 | # I have not found a way of making docbook2texi write its output anywhere | |
175 | # other than the file name that it makes up. The --to-stdout option does not | |
176 | # work. | |
177 | ||
9b371988 PH |
178 | spec.info: spec-info.xml |
179 | docbook2texi spec-info.xml | |
4f578862 | 180 | ./TidyInfo <the_exim_mta.texi >spec.texinfo |
168e428f | 181 | /bin/rm -rf the_exim_mta.texi |
595028e4 | 182 | makeinfo -o spec.info --no-split spec.texinfo |
168e428f PH |
183 | |
184 | ######################################################################## | |
185 | ||
186 | ||
187 | ################################ TEST ################################## | |
188 | ||
189 | # These targets (similar to the above) are for running little tests. | |
190 | ||
9b371988 PH |
191 | test.xml: test.xfpt |
192 | xfpt test.xfpt | |
168e428f | 193 | |
f89d2485 PH |
194 | test-pr.xml: test.xml Pre-xml |
195 | ./Pre-xml <test.xml >test-pr.xml | |
168e428f PH |
196 | |
197 | test-html.xml: test.xml Pre-xml | |
9b371988 | 198 | ./Pre-xml -html -oneindex <test.xml >test-html.xml |
168e428f PH |
199 | |
200 | test-txt.xml: test.xml Pre-xml | |
9b371988 PH |
201 | ./Pre-xml -ascii -html -noindex -quoteinfo \ |
202 | <test.xml >test-txt.xml | |
203 | ||
204 | test-info.xml: test.xml Pre-xml | |
205 | ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml | |
168e428f | 206 | |
f89d2485 | 207 | test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \ |
9b371988 | 208 | MyTitleStyle.xsl |
f89d2485 PH |
209 | /bin/rm -rf test.fo test-pr.fo |
210 | xmlto -x MyStyle-spec-fo.xsl fo test-pr.xml | |
211 | /bin/mv -f test-pr.fo test.fo | |
212 | ||
213 | ### | |
214 | ### PS/PDF generation using fop | |
215 | ### | |
168e428f | 216 | |
deca074a PH |
217 | # Do not use pdf2ps from the PDF version; better PS is generated directly. |
218 | ||
f89d2485 | 219 | fop-test.ps: test.fo |
068aaea8 PH |
220 | fop test.fo -ps test-tmp.ps |
221 | mv test-tmp.ps test.ps | |
168e428f | 222 | |
deca074a PH |
223 | # Do not use ps2pdf from the PS version; better PDF is generated directly. It |
224 | # contains cross links etc. | |
d1e83bff | 225 | |
f89d2485 | 226 | fop-test.pdf: test.fo |
deca074a PH |
227 | fop test.fo -pdf test-tmp.pdf |
228 | mv test-tmp.pdf test.pdf | |
168e428f | 229 | |
f89d2485 PH |
230 | ### |
231 | ### PS/PDF generation using SDoP | |
232 | ### | |
233 | ||
234 | sdop-test.ps: test-pr.xml | |
235 | sdop -o test.ps test-pr.xml | |
236 | ||
4aa45c31 | 237 | sdop-test.pdf: test.ps |
f89d2485 PH |
238 | ps2pdf test.ps test.pdf |
239 | ||
240 | ### | |
241 | ### PS/PDF default setting | |
242 | ### | |
243 | ||
244 | test.ps: sdop-test.ps | |
245 | ||
246 | test.pdf: sdop-test.pdf | |
247 | ||
248 | ### | |
249 | ### | |
250 | ||
251 | ||
9b371988 PH |
252 | test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \ |
253 | MyStyle.xsl | |
168e428f PH |
254 | /bin/rm -rf test-txt.html |
255 | xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml | |
256 | w3m -dump test-txt.html | Tidytxt >test.txt | |
257 | ||
258 | # I have not found a way of making docbook2texi write its output anywhere | |
259 | # other than the file name that it makes up. The --to-stdout option does not | |
260 | # work. | |
261 | ||
9b371988 PH |
262 | test.info: test-info.xml |
263 | docbook2texi test-info.xml | |
4f578862 | 264 | ./TidyInfo <short_title.texi >test.texinfo |
168e428f PH |
265 | /bin/rm -rf short_title.texi |
266 | makeinfo -o test.info test.texinfo | |
267 | ||
268 | ######################################################################## | |
269 | ||
270 | ||
a2119650 NM |
271 | ############################## OS FIXUP ################################ |
272 | ||
273 | # Yes, we've advanced so far in text processing that we now have to | |
274 | # hardcode in complete paths and so become dependent upon exactly where | |
275 | # files were installed for xsl:import. Which of course varies by OS. | |
276 | ||
277 | os-fixup: | |
278 | ./OS-Fixups | |
279 | ||
280 | ######################################################################## | |
281 | ||
282 | ||
168e428f PH |
283 | ################################ CLEAN ################################# |
284 | ||
285 | clean:; /bin/rm -rf exim.8 \ | |
286 | filter*.xml spec*.xml test*.xml \ | |
287 | *.fo *.html *.pdf *.ps \ | |
288 | filter*.txt spec*.txt test*.txt \ | |
289 | *.info* *.texinfo *.texi | |
290 | ||
291 | ######################################################################## |