8e485ab2d18d5517a888651698c21336b11cda0a
[exim.git] / doc / doc-docbook / Makefile
1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.11 2007/08/29 13:37:28 ph10 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 ############################## MAN PAGE ################################
12
13 exim.8:       spec.xml x2man
14               ./x2man
15
16 ########################################################################
17
18
19 ############################### FILTER #################################
20
21 filter.xml:      filter.xfpt
22                  xfpt filter.xfpt
23
24 filter-pr.xml:   filter.xml Pre-xml
25                  ./Pre-xml -bookinfo <filter.xml >filter-pr.xml
26
27 filter-html.xml: filter.xml Pre-xml
28                  ./Pre-xml -html <filter.xml >filter-html.xml
29
30 filter-txt.xml:  filter.xml Pre-xml
31                  ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
32
33 filter-info.xml: filter.xml Pre-xml
34                  ./Pre-xml -ascii -html <filter.xml >filter-info.xml
35
36 filter.fo:       filter-pr.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
37                  /bin/rm -rf filter.fo filter-pr.fo
38                  xmlto -x MyStyle-filter-fo.xsl fo filter-pr.xml
39                  /bin/mv -f filter-pr.fo filter.fo
40
41 # Do not use pdf2ps from the PDF version; better PS is generated directly.
42
43 ###
44 ### PS/PDF generation using fop
45 ###
46
47 fop-filter.ps:   filter.fo
48                  fop filter.fo -ps filter-tmp.ps
49                  mv filter-tmp.ps filter.ps
50
51 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
52 # contains cross links etc.
53
54 fop-filter.pdf:  filter.fo PageLabelPDF
55                  fop filter.fo -pdf filter-tmp.pdf
56                  ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf
57
58 ###
59 ### PS/PDF generation using SDoP
60 ###
61
62 sdop-filter.ps:  filter-pr.xml
63                  sdop -o filter.ps filter-pr.xml
64
65 sdop-filter.pdf: filter.ps
66                  ps2pdf filter.ps filter.pdf
67
68 ###
69 ### PS/PDF default setting
70 ###
71
72 filter.ps:  sdop-filter.ps
73
74 filter.pdf: sdop-filter.pdf
75
76 ###
77 ###
78
79 filter.html:  filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
80                 MyStyle-html.xsl MyStyle.xsl
81               /bin/rm -rf filter.html filter-html.html
82               xmlto -x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml
83               /bin/mv -f filter-html.html filter.html
84               ./TidyHTML-filter
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-html.xml: spec.xml Pre-xml
115                ./Pre-xml -html -oneindex \
116                  <spec.xml >spec-html.xml
117
118 spec-txt.xml:  spec.xml Pre-xml
119                ./Pre-xml -ascii -html -noindex -quoteliteral \
120                  <spec.xml >spec-txt.xml
121
122 spec-info.xml: spec.xml Pre-xml
123                ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
124
125 spec.fo:       spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
126                MyTitleStyle.xsl
127                /bin/rm -rf spec.fo spec-pr.fo
128                xmlto -x MyStyle-spec-fo.xsl fo spec-pr.xml
129                /bin/mv -f spec-pr.fo spec.fo
130
131 ###
132 ### PS/PDF generation using fop
133 ###
134
135 # Do not use pdf2ps from the PDF version; better PS is generated directly.
136
137 fop-spec.ps:  spec.fo
138               FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
139               mv spec-tmp.ps spec.ps
140
141 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
142 # contains cross links etc. We post-process it to add page label information
143 # so that the page identifiers shown by acroread are the correct page numbers.
144
145 fop-spec.pdf: spec.fo PageLabelPDF
146               FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
147               ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
148
149 ###
150 ### PS/PDF generation using SDoP
151 ###
152
153 sdop-spec.ps:  spec-pr.xml
154                sdop -o spec.ps spec-pr.xml
155
156 sdop-spec.pdf: spec.ps
157                ps2pdf spec.ps spec.pdf
158
159 ###
160 ### PS/PDF default setting
161 ###
162
163 spec.ps:  sdop-spec.ps
164
165 spec.pdf: sdop-spec.pdf
166
167 ###
168 ###
169
170 spec.html:    spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
171                 MyStyle-html.xsl MyStyle.xsl
172               /bin/rm -rf spec_html
173               xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml
174               ./TidyHTML-spec
175
176 spec.txt:     spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
177                 MyStyle.xsl
178               /bin/rm -rf spec-txt.html
179               xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
180               w3m -dump spec-txt.html | ./Tidytxt >spec.txt
181
182 # I have not found a way of making docbook2texi write its output anywhere
183 # other than the file name that it makes up. The --to-stdout option does not
184 # work.
185
186 spec.info:    spec-info.xml
187               docbook2texi spec-info.xml
188               ./TidyInfo <the_exim_mta.texi >spec.texinfo
189               /bin/rm -rf the_exim_mta.texi
190               makeinfo -o spec.info --no-split spec.texinfo
191
192 ########################################################################
193
194
195 ################################ TEST ##################################
196
197 # These targets (similar to the above)  are for running little tests.
198
199 test.xml:     test.xfpt
200               xfpt test.xfpt
201
202 test-pr.xml:  test.xml Pre-xml
203               ./Pre-xml <test.xml >test-pr.xml
204
205 test-html.xml: test.xml Pre-xml
206               ./Pre-xml -html -oneindex <test.xml >test-html.xml
207
208 test-txt.xml: test.xml Pre-xml
209               ./Pre-xml -ascii -html -noindex -quoteinfo \
210                 <test.xml >test-txt.xml
211
212 test-info.xml: test.xml Pre-xml
213               ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
214
215 test.fo:      test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
216                 MyTitleStyle.xsl
217               /bin/rm -rf test.fo test-pr.fo
218               xmlto -x MyStyle-spec-fo.xsl fo test-pr.xml
219               /bin/mv -f test-pr.fo test.fo
220
221 ###
222 ### PS/PDF generation using fop
223 ###
224
225 # Do not use pdf2ps from the PDF version; better PS is generated directly.
226
227 fop-test.ps:  test.fo
228               fop test.fo -ps test-tmp.ps
229               mv test-tmp.ps test.ps
230
231 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
232 # contains cross links etc.
233
234 fop-test.pdf: test.fo
235               fop test.fo -pdf test-tmp.pdf
236               mv test-tmp.pdf test.pdf
237
238 ###
239 ### PS/PDF generation using SDoP
240 ###
241
242 sdop-test.ps:  test-pr.xml
243                sdop -o test.ps test-pr.xml
244
245 sdop-test.pdf: test.ps
246                ps2pdf test.ps test.pdf
247
248 ###
249 ### PS/PDF default setting
250 ###
251
252 test.ps:  sdop-test.ps
253
254 test.pdf: sdop-test.pdf
255
256 ###
257 ###
258
259
260 test.html:    test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
261                 MyStyle.xsl
262               /bin/rm -rf test.html test-html.html
263               xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
264               /bin/mv -f test-html.html test.html
265
266 test.txt:     test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
267                 MyStyle.xsl
268               /bin/rm -rf test-txt.html
269               xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
270               w3m -dump test-txt.html | Tidytxt >test.txt
271
272 # I have not found a way of making docbook2texi write its output anywhere
273 # other than the file name that it makes up. The --to-stdout option does not
274 # work.
275
276 test.info:    test-info.xml
277               docbook2texi test-info.xml
278               ./TidyInfo <short_title.texi >test.texinfo
279               /bin/rm -rf short_title.texi
280               makeinfo -o test.info test.texinfo
281
282 ########################################################################
283
284
285 ################################ CLEAN #################################
286
287 clean:; /bin/rm -rf exim.8 \
288               filter*.xml spec*.xml test*.xml \
289               *.fo *.html *.pdf *.ps \
290               filter*.txt spec*.txt test*.txt \
291               *.info* *.texinfo *.texi
292
293 ########################################################################