Docs: Add note on lsearch for IPv4-mapped IPv6 addresses
[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'."
263c04a6 5 @echo "** One other possible targets 'exim.8', 'spec.utf8'".
168e428f
PH
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
aded2255 14## removed html files as superseded by new website code
50023e05
NM
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
4c04137d 26# .PHONY doesn't work here, because it forces a rebuild of all dependent
263c04a6
HSHR
27# targets, always. It sets the internal timestamp of its target to
28# now().
29# But it may happen that local_params does not change
30FORCE:
31local_params: FORCE GenLocalParams
32 @set -e; \
33 trap 'rm -f $$tmp' EXIT; \
34 tmp=`mktemp`; \
35 ./GenLocalParams $$tmp; \
36 cmp -s $@ $$tmp || mv $$tmp $@
168e428f
PH
37
38############################### FILTER #################################
39
2aee48d6 40filter.xml: local_params filter.xfpt
f89d2485 41 xfpt filter.xfpt
168e428f 42
f89d2485
PH
43filter-pr.xml: filter.xml Pre-xml
44 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
168e428f 45
f89d2485
PH
46filter-txt.xml: filter.xml Pre-xml
47 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
9b371988
PH
48
49filter-info.xml: filter.xml Pre-xml
f89d2485 50 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
168e428f 51
f89d2485
PH
52filter.fo: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
53 /bin/rm -rf filter.fo filter-pr.fo
54 xmlto -x MyStyle-filter-fo.xsl fo filter-pr.xml
55 /bin/mv -f filter-pr.fo filter.fo
168e428f 56
deca074a
PH
57# Do not use pdf2ps from the PDF version; better PS is generated directly.
58
f89d2485
PH
59###
60### PS/PDF generation using fop
61###
62
63fop-filter.ps: filter.fo
64 fop filter.fo -ps filter-tmp.ps
65 mv filter-tmp.ps filter.ps
168e428f 66
deca074a
PH
67# Do not use ps2pdf from the PS version; better PDF is generated directly. It
68# contains cross links etc.
d1e83bff 69
f89d2485
PH
70fop-filter.pdf: filter.fo PageLabelPDF
71 fop filter.fo -pdf filter-tmp.pdf
72 ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf
73
74###
75### PS/PDF generation using SDoP
76###
77
78sdop-filter.ps: filter-pr.xml
79 sdop -o filter.ps filter-pr.xml
80
4aa45c31 81sdop-filter.pdf: filter.ps
f89d2485
PH
82 ps2pdf filter.ps filter.pdf
83
84###
85### PS/PDF default setting
86###
87
88filter.ps: sdop-filter.ps
89
90filter.pdf: sdop-filter.pdf
91
92###
93###
168e428f 94
9b371988
PH
95filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
96 MyStyle.xsl
168e428f
PH
97 /bin/rm -rf filter-txt.html
98 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
53d77ba6 99 command -v w3m >/dev/null
263c04a6 100 LC_ALL=C 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
263c04a6
HSHR
119spec.xml: spec.xfpt local_params
120 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
263c04a6
HSHR
177spec-txt.html: spec-txt.xml \
178 MyStyle-txt-html.xsl MyStyle-html.xsl MyStyle.xsl
179 xmlto -x MyStyle-txt-html.xsl html-nochunks $<
180
181spec.utf8: spec-txt.html Tidytxt
182 @grep -iq 'LC_CTYPE=.*utf-\?8' local_params || { \
183 echo 'your current locale does not support UTF-8' >&2; \
184 false; }
53d77ba6 185 command -v w3m >/dev/null
263c04a6
HSHR
186 w3m -dump $< | ./Tidytxt -utf8 >$@
187
188spec.txt: spec-txt.html Tidytxt
53d77ba6 189 command -v w3m >/dev/null
263c04a6 190 LC_ALL=C w3m -dump $< | ./Tidytxt >$@
b32a9711 191 ./SanityTestText spec.txt
168e428f 192
263c04a6 193
168e428f
PH
194# I have not found a way of making docbook2texi write its output anywhere
195# other than the file name that it makes up. The --to-stdout option does not
196# work.
197
9b371988
PH
198spec.info: spec-info.xml
199 docbook2texi spec-info.xml
4f578862 200 ./TidyInfo <the_exim_mta.texi >spec.texinfo
168e428f 201 /bin/rm -rf the_exim_mta.texi
595028e4 202 makeinfo -o spec.info --no-split spec.texinfo
168e428f
PH
203
204########################################################################
205
206
207################################ TEST ##################################
208
209# These targets (similar to the above) are for running little tests.
210
9b371988
PH
211test.xml: test.xfpt
212 xfpt test.xfpt
168e428f 213
f89d2485
PH
214test-pr.xml: test.xml Pre-xml
215 ./Pre-xml <test.xml >test-pr.xml
168e428f
PH
216
217test-html.xml: test.xml Pre-xml
9b371988 218 ./Pre-xml -html -oneindex <test.xml >test-html.xml
168e428f
PH
219
220test-txt.xml: test.xml Pre-xml
9b371988
PH
221 ./Pre-xml -ascii -html -noindex -quoteinfo \
222 <test.xml >test-txt.xml
223
224test-info.xml: test.xml Pre-xml
225 ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
168e428f 226
f89d2485 227test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
9b371988 228 MyTitleStyle.xsl
f89d2485
PH
229 /bin/rm -rf test.fo test-pr.fo
230 xmlto -x MyStyle-spec-fo.xsl fo test-pr.xml
231 /bin/mv -f test-pr.fo test.fo
232
233###
234### PS/PDF generation using fop
235###
168e428f 236
deca074a
PH
237# Do not use pdf2ps from the PDF version; better PS is generated directly.
238
f89d2485 239fop-test.ps: test.fo
068aaea8
PH
240 fop test.fo -ps test-tmp.ps
241 mv test-tmp.ps test.ps
168e428f 242
deca074a
PH
243# Do not use ps2pdf from the PS version; better PDF is generated directly. It
244# contains cross links etc.
d1e83bff 245
f89d2485 246fop-test.pdf: test.fo
deca074a
PH
247 fop test.fo -pdf test-tmp.pdf
248 mv test-tmp.pdf test.pdf
168e428f 249
f89d2485
PH
250###
251### PS/PDF generation using SDoP
252###
253
254sdop-test.ps: test-pr.xml
255 sdop -o test.ps test-pr.xml
256
4aa45c31 257sdop-test.pdf: test.ps
f89d2485
PH
258 ps2pdf test.ps test.pdf
259
260###
261### PS/PDF default setting
262###
263
264test.ps: sdop-test.ps
265
266test.pdf: sdop-test.pdf
267
268###
269###
270
271
9b371988
PH
272test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
273 MyStyle.xsl
168e428f
PH
274 /bin/rm -rf test-txt.html
275 xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
53d77ba6 276 command -v w3m >/dev/null
168e428f
PH
277 w3m -dump test-txt.html | Tidytxt >test.txt
278
279# I have not found a way of making docbook2texi write its output anywhere
280# other than the file name that it makes up. The --to-stdout option does not
281# work.
282
9b371988
PH
283test.info: test-info.xml
284 docbook2texi test-info.xml
4f578862 285 ./TidyInfo <short_title.texi >test.texinfo
168e428f
PH
286 /bin/rm -rf short_title.texi
287 makeinfo -o test.info test.texinfo
288
289########################################################################
290
291
a2119650
NM
292############################## OS FIXUP ################################
293
294# Yes, we've advanced so far in text processing that we now have to
295# hardcode in complete paths and so become dependent upon exactly where
296# files were installed for xsl:import. Which of course varies by OS.
297
298os-fixup:
299 ./OS-Fixups
300
301########################################################################
302
303
168e428f
PH
304################################ CLEAN #################################
305
306clean:; /bin/rm -rf exim.8 \
307 filter*.xml spec*.xml test*.xml \
ca0ff207
TL
308 *.fo *.pdf *.ps \
309 filter*.html spec*.html test*.html \
168e428f
PH
310 filter*.txt spec*.txt test*.txt \
311 *.info* *.texinfo *.texi
312
313########################################################################