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