Stripped old HTML doc generation - will add new HTML gen soon
[exim.git] / doc / doc-docbook / Makefile
1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.14 2010/05/28 15:38:18 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 ## removed info files as I cannot generate them - spec.info filter.info
16 ## removed html files as superceded by new website code
17 everything: spec.pdf spec.ps spec.txt \
18 filter.pdf filter.ps filter.txt \
19 exim.8
20
21 ############################## MAN PAGE ################################
22
23 exim.8: spec.xml x2man
24 ./x2man
25
26 ########################################################################
27
28
29 ############################### FILTER #################################
30
31 filter.xml: filter.xfpt
32 xfpt filter.xfpt
33
34 filter-pr.xml: filter.xml Pre-xml
35 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
36
37 filter-txt.xml: filter.xml Pre-xml
38 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
39
40 filter-info.xml: filter.xml Pre-xml
41 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
42
43 filter.fo: filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
44 /bin/rm -rf filter.fo filter-pr.fo
45 xmlto -x MyStyle-filter-fo.xsl fo filter-pr.xml
46 /bin/mv -f filter-pr.fo filter.fo
47
48 # Do not use pdf2ps from the PDF version; better PS is generated directly.
49
50 ###
51 ### PS/PDF generation using fop
52 ###
53
54 fop-filter.ps: filter.fo
55 fop filter.fo -ps filter-tmp.ps
56 mv filter-tmp.ps filter.ps
57
58 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
59 # contains cross links etc.
60
61 fop-filter.pdf: filter.fo PageLabelPDF
62 fop filter.fo -pdf filter-tmp.pdf
63 ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf
64
65 ###
66 ### PS/PDF generation using SDoP
67 ###
68
69 sdop-filter.ps: filter-pr.xml
70 sdop -o filter.ps filter-pr.xml
71
72 sdop-filter.pdf: filter.ps
73 ps2pdf filter.ps filter.pdf
74
75 ###
76 ### PS/PDF default setting
77 ###
78
79 filter.ps: sdop-filter.ps
80
81 filter.pdf: sdop-filter.pdf
82
83 ###
84 ###
85
86 filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
87 MyStyle.xsl
88 /bin/rm -rf filter-txt.html
89 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
90 w3m -dump filter-txt.html | ./Tidytxt >filter.txt
91
92 # I have not found a way of making docbook2texi write its output anywhere
93 # other than the file name that it makes up. The --to-stdout option does not
94 # work.
95
96 filter.info: filter-info.xml
97 docbook2texi filter-info.xml
98 perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
99 <exim_filtering.texi | ./Tidytxt >filter.texinfo
100 /bin/rm -rf exim_filtering.texi
101 makeinfo -o filter.info filter.texinfo
102
103 ########################################################################
104
105
106 ################################ SPEC ##################################
107
108 spec.xml: spec.xfpt
109 xfpt spec.xfpt
110
111 spec-pr.xml: spec.xml Pre-xml
112 ./Pre-xml -optbreak <spec.xml >spec-pr.xml
113
114 spec-txt.xml: spec.xml Pre-xml
115 ./Pre-xml -ascii -html -noindex -quoteliteral \
116 <spec.xml >spec-txt.xml
117
118 spec-info.xml: spec.xml Pre-xml
119 ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
120
121 spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
122 MyTitleStyle.xsl
123 /bin/rm -rf spec.fo spec-pr.fo
124 xmlto -x MyStyle-spec-fo.xsl fo spec-pr.xml
125 /bin/mv -f spec-pr.fo spec.fo
126
127 ###
128 ### PS/PDF generation using fop
129 ###
130
131 # Do not use pdf2ps from the PDF version; better PS is generated directly.
132
133 fop-spec.ps: spec.fo
134 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
135 mv spec-tmp.ps spec.ps
136
137 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
138 # contains cross links etc. We post-process it to add page label information
139 # so that the page identifiers shown by acroread are the correct page numbers.
140
141 fop-spec.pdf: spec.fo PageLabelPDF
142 FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
143 ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
144
145 ###
146 ### PS/PDF generation using SDoP
147 ###
148
149 sdop-spec.ps: spec-pr.xml
150 sdop -o spec.ps spec-pr.xml
151
152 sdop-spec.pdf: spec.ps
153 ps2pdf spec.ps spec.pdf
154
155 ###
156 ### PS/PDF default setting
157 ###
158
159 spec.ps: sdop-spec.ps
160
161 spec.pdf: sdop-spec.pdf
162
163 ###
164 ###
165
166 spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
167 MyStyle.xsl
168 /bin/rm -rf spec-txt.html
169 xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
170 w3m -dump spec-txt.html | ./Tidytxt >spec.txt
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
176 spec.info: spec-info.xml
177 docbook2texi spec-info.xml
178 ./TidyInfo <the_exim_mta.texi >spec.texinfo
179 /bin/rm -rf the_exim_mta.texi
180 makeinfo -o spec.info --no-split spec.texinfo
181
182 ########################################################################
183
184
185 ################################ TEST ##################################
186
187 # These targets (similar to the above) are for running little tests.
188
189 test.xml: test.xfpt
190 xfpt test.xfpt
191
192 test-pr.xml: test.xml Pre-xml
193 ./Pre-xml <test.xml >test-pr.xml
194
195 test-html.xml: test.xml Pre-xml
196 ./Pre-xml -html -oneindex <test.xml >test-html.xml
197
198 test-txt.xml: test.xml Pre-xml
199 ./Pre-xml -ascii -html -noindex -quoteinfo \
200 <test.xml >test-txt.xml
201
202 test-info.xml: test.xml Pre-xml
203 ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
204
205 test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
206 MyTitleStyle.xsl
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 ###
214
215 # Do not use pdf2ps from the PDF version; better PS is generated directly.
216
217 fop-test.ps: test.fo
218 fop test.fo -ps test-tmp.ps
219 mv test-tmp.ps test.ps
220
221 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
222 # contains cross links etc.
223
224 fop-test.pdf: test.fo
225 fop test.fo -pdf test-tmp.pdf
226 mv test-tmp.pdf test.pdf
227
228 ###
229 ### PS/PDF generation using SDoP
230 ###
231
232 sdop-test.ps: test-pr.xml
233 sdop -o test.ps test-pr.xml
234
235 sdop-test.pdf: test.ps
236 ps2pdf test.ps test.pdf
237
238 ###
239 ### PS/PDF default setting
240 ###
241
242 test.ps: sdop-test.ps
243
244 test.pdf: sdop-test.pdf
245
246 ###
247 ###
248
249
250 test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
251 MyStyle.xsl
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
260 test.info: test-info.xml
261 docbook2texi test-info.xml
262 ./TidyInfo <short_title.texi >test.texinfo
263 /bin/rm -rf short_title.texi
264 makeinfo -o test.info test.texinfo
265
266 ########################################################################
267
268
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
275 os-fixup:
276 ./OS-Fixups
277
278 ########################################################################
279
280
281 ################################ CLEAN #################################
282
283 clean:; /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 ########################################################################