GnuTLS website moves
[exim.git] / doc / doc-docbook / Makefile
1 # Make file for Exim documentation from xfpt source.
2
3 notarget:; @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
9 ############################# EVERYTHING ###############################
10 #
11 # Generate all the documentation files...
12 #
13 ## removed info files as I cannot generate them - spec.info filter.info
14 ## removed html files as superceded by new website code
15 everything: spec.pdf spec.ps spec.txt \
16 filter.pdf filter.ps filter.txt \
17 exim.8
18
19 ############################## MAN PAGE ################################
20
21 exim.8: spec.xml x2man
22 ./x2man
23
24 ########################################################################
25
26 .PHONY: local_params
27 local_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
38
39 ############################### FILTER #################################
40
41 filter.xml: local_params filter.xfpt
42 xfpt filter.xfpt
43
44 filter-pr.xml: filter.xml Pre-xml
45 ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
46
47 filter-txt.xml: filter.xml Pre-xml
48 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
49
50 filter-info.xml: filter.xml Pre-xml
51 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
52
53 filter.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
57
58 # Do not use pdf2ps from the PDF version; better PS is generated directly.
59
60 ###
61 ### PS/PDF generation using fop
62 ###
63
64 fop-filter.ps: filter.fo
65 fop filter.fo -ps filter-tmp.ps
66 mv filter-tmp.ps filter.ps
67
68 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
69 # contains cross links etc.
70
71 fop-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
79 sdop-filter.ps: filter-pr.xml
80 sdop -o filter.ps filter-pr.xml
81
82 sdop-filter.pdf: filter.ps
83 ps2pdf filter.ps filter.pdf
84
85 ###
86 ### PS/PDF default setting
87 ###
88
89 filter.ps: sdop-filter.ps
90
91 filter.pdf: sdop-filter.pdf
92
93 ###
94 ###
95
96 filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
97 MyStyle.xsl
98 /bin/rm -rf filter-txt.html
99 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
100 w3m -dump filter-txt.html | ./Tidytxt >filter.txt
101 ./SanityTestText filter.txt
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
107 filter.info: filter-info.xml
108 docbook2texi filter-info.xml
109 perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
110 <exim_filtering.texi | ./Tidytxt >filter.texinfo
111 /bin/rm -rf exim_filtering.texi
112 makeinfo -o filter.info filter.texinfo
113
114 ########################################################################
115
116
117 ################################ SPEC ##################################
118
119 spec.xml: local_params spec.xfpt
120 xfpt spec.xfpt
121
122 spec-pr.xml: spec.xml Pre-xml
123 ./Pre-xml -optbreak <spec.xml >spec-pr.xml
124
125 spec-txt.xml: spec.xml Pre-xml
126 ./Pre-xml -ascii -html -noindex -quoteliteral \
127 <spec.xml >spec-txt.xml
128
129 spec-info.xml: spec.xml Pre-xml
130 ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
131
132 spec.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
137
138 ###
139 ### PS/PDF generation using fop
140 ###
141
142 # Do not use pdf2ps from the PDF version; better PS is generated directly.
143
144 fop-spec.ps: spec.fo
145 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
146 mv spec-tmp.ps spec.ps
147
148 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
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.
151
152 fop-spec.pdf: spec.fo PageLabelPDF
153 FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
154 ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
155
156 ###
157 ### PS/PDF generation using SDoP
158 ###
159
160 sdop-spec.ps: spec-pr.xml
161 sdop -o spec.ps spec-pr.xml
162
163 sdop-spec.pdf: spec.ps
164 ps2pdf spec.ps spec.pdf
165
166 ###
167 ### PS/PDF default setting
168 ###
169
170 spec.ps: sdop-spec.ps
171
172 spec.pdf: sdop-spec.pdf
173
174 ###
175 ###
176
177 spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
178 MyStyle.xsl
179 /bin/rm -rf spec-txt.html
180 xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
181 w3m -dump spec-txt.html | ./Tidytxt >spec.txt
182 ./SanityTestText spec.txt
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
188 spec.info: spec-info.xml
189 docbook2texi spec-info.xml
190 ./TidyInfo <the_exim_mta.texi >spec.texinfo
191 /bin/rm -rf the_exim_mta.texi
192 makeinfo -o spec.info --no-split spec.texinfo
193
194 ########################################################################
195
196
197 ################################ TEST ##################################
198
199 # These targets (similar to the above) are for running little tests.
200
201 test.xml: test.xfpt
202 xfpt test.xfpt
203
204 test-pr.xml: test.xml Pre-xml
205 ./Pre-xml <test.xml >test-pr.xml
206
207 test-html.xml: test.xml Pre-xml
208 ./Pre-xml -html -oneindex <test.xml >test-html.xml
209
210 test-txt.xml: test.xml Pre-xml
211 ./Pre-xml -ascii -html -noindex -quoteinfo \
212 <test.xml >test-txt.xml
213
214 test-info.xml: test.xml Pre-xml
215 ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
216
217 test.fo: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
218 MyTitleStyle.xsl
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 ###
226
227 # Do not use pdf2ps from the PDF version; better PS is generated directly.
228
229 fop-test.ps: test.fo
230 fop test.fo -ps test-tmp.ps
231 mv test-tmp.ps test.ps
232
233 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
234 # contains cross links etc.
235
236 fop-test.pdf: test.fo
237 fop test.fo -pdf test-tmp.pdf
238 mv test-tmp.pdf test.pdf
239
240 ###
241 ### PS/PDF generation using SDoP
242 ###
243
244 sdop-test.ps: test-pr.xml
245 sdop -o test.ps test-pr.xml
246
247 sdop-test.pdf: test.ps
248 ps2pdf test.ps test.pdf
249
250 ###
251 ### PS/PDF default setting
252 ###
253
254 test.ps: sdop-test.ps
255
256 test.pdf: sdop-test.pdf
257
258 ###
259 ###
260
261
262 test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
263 MyStyle.xsl
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
272 test.info: test-info.xml
273 docbook2texi test-info.xml
274 ./TidyInfo <short_title.texi >test.texinfo
275 /bin/rm -rf short_title.texi
276 makeinfo -o test.info test.texinfo
277
278 ########################################################################
279
280
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
287 os-fixup:
288 ./OS-Fixups
289
290 ########################################################################
291
292
293 ################################ CLEAN #################################
294
295 clean:; /bin/rm -rf exim.8 \
296 filter*.xml spec*.xml test*.xml \
297 *.fo *.pdf *.ps \
298 filter*.html spec*.html test*.html \
299 filter*.txt spec*.txt test*.txt \
300 *.info* *.texinfo *.texi
301
302 ########################################################################