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