Make SUN compiler happy. Fixes #902
[exim.git] / doc / doc-docbook / Makefile
1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.13 2009/10/16 10:36:52 nm4 Exp $
2
3 # Make file for Exim documentation from xfpt source.
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 ############################# 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
19 ############################## MAN PAGE ################################
20
21 exim.8: spec.xml x2man
22 ./x2man
23
24 ########################################################################
25
26
27 ############################### FILTER #################################
28
29 filter.xml: filter.xfpt
30 xfpt filter.xfpt
31
32 filter-pr.xml: filter.xml Pre-xml
33 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
34
35 filter-html.xml: filter.xml Pre-xml
36 ./Pre-xml -html <filter.xml >filter-html.xml
37
38 filter-txt.xml: filter.xml Pre-xml
39 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
40
41 filter-info.xml: filter.xml Pre-xml
42 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
43
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
48
49 # Do not use pdf2ps from the PDF version; better PS is generated directly.
50
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
58
59 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
60 # contains cross links etc.
61
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
73 sdop-filter.pdf: filter.ps
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 ###
86
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
92 ./TidyHTML-filter
93
94 filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
95 MyStyle.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
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
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
110
111 ########################################################################
112
113
114 ################################ SPEC ##################################
115
116 spec.xml: spec.xfpt
117 xfpt spec.xfpt
118
119 spec-pr.xml: spec.xml Pre-xml
120 ./Pre-xml -optbreak <spec.xml >spec-pr.xml
121
122 spec-html.xml: spec.xml Pre-xml
123 ./Pre-xml -html -oneindex \
124 <spec.xml >spec-html.xml
125
126 spec-txt.xml: spec.xml Pre-xml
127 ./Pre-xml -ascii -html -noindex -quoteliteral \
128 <spec.xml >spec-txt.xml
129
130 spec-info.xml: spec.xml Pre-xml
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
138
139 ###
140 ### PS/PDF generation using fop
141 ###
142
143 # Do not use pdf2ps from the PDF version; better PS is generated directly.
144
145 fop-spec.ps: spec.fo
146 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
147 mv spec-tmp.ps spec.ps
148
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.
152
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
156
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
164 sdop-spec.pdf: spec.ps
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
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
182 ./TidyHTML-spec
183
184 spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
185 MyStyle.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
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
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
199
200 ########################################################################
201
202
203 ################################ TEST ##################################
204
205 # These targets (similar to the above) are for running little tests.
206
207 test.xml: test.xfpt
208 xfpt test.xfpt
209
210 test-pr.xml: test.xml Pre-xml
211 ./Pre-xml <test.xml >test-pr.xml
212
213 test-html.xml: test.xml Pre-xml
214 ./Pre-xml -html -oneindex <test.xml >test-html.xml
215
216 test-txt.xml: test.xml Pre-xml
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
222
223 test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
224 MyTitleStyle.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
228
229 ###
230 ### PS/PDF generation using fop
231 ###
232
233 # Do not use pdf2ps from the PDF version; better PS is generated directly.
234
235 fop-test.ps: test.fo
236 fop test.fo -ps test-tmp.ps
237 mv test-tmp.ps test.ps
238
239 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
240 # contains cross links etc.
241
242 fop-test.pdf: test.fo
243 fop test.fo -pdf test-tmp.pdf
244 mv test-tmp.pdf test.pdf
245
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
253 sdop-test.pdf: test.ps
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
268 test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
269 MyStyle.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
273
274 test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
275 MyStyle.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
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
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
289
290 ########################################################################
291
292
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
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 ########################################################################