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