Update for eximstats 1.58
[exim.git] / doc / doc-docbook / Makefile
CommitLineData
4f578862 1# $Cambridge: exim/doc/doc-docbook/Makefile,v 1.8 2006/04/04 14:03:49 ph10 Exp $
168e428f 2
9b371988 3# Make file for Exim documentation from xfpt source.
168e428f
PH
4
5notarget:; @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
9b371988 13exim.8: spec.xml x2man
168e428f
PH
14 ./x2man
15
16########################################################################
17
18
19############################### FILTER #################################
20
9b371988
PH
21filter.xml: filter.xfpt
22 xfpt filter.xfpt
168e428f
PH
23
24filter-fo.xml: filter.xml Pre-xml
25a321c8 25 ./Pre-xml -bookinfo <filter.xml >filter-fo.xml
168e428f
PH
26
27filter-html.xml: filter.xml Pre-xml
25a321c8 28 ./Pre-xml -html <filter.xml >filter-html.xml
168e428f
PH
29
30filter-txt.xml: filter.xml Pre-xml
9b371988
PH
31 ./Pre-xml -ascii -html -quoteliteral <filter.xml >filter-txt.xml
32
33filter-info.xml: filter.xml Pre-xml
34 ./Pre-xml -ascii -html <filter.xml >filter-info.xml
168e428f
PH
35
36filter.fo: filter-fo.xml MyStyle-filter-fo.xsl MyStyle-fo.xsl MyStyle.xsl
37 /bin/rm -rf filter.fo filter-fo.fo
38 xmlto -x MyStyle-filter-fo.xsl fo filter-fo.xml
39 /bin/mv -f filter-fo.fo filter.fo
40
deca074a
PH
41# Do not use pdf2ps from the PDF version; better PS is generated directly.
42
168e428f 43filter.ps: filter.fo
068aaea8
PH
44 fop filter.fo -ps filter-tmp.ps
45 mv filter-tmp.ps filter.ps
168e428f 46
deca074a
PH
47# Do not use ps2pdf from the PS version; better PDF is generated directly. It
48# contains cross links etc.
d1e83bff 49
4f578862 50filter.pdf: filter.fo PageLabelPDF
deca074a 51 fop filter.fo -pdf filter-tmp.pdf
4f578862 52 ./PageLabelPDF 2 <filter-tmp.pdf >filter.pdf
168e428f 53
9b371988
PH
54filter.html: filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
55 MyStyle-html.xsl MyStyle.xsl
168e428f
PH
56 /bin/rm -rf filter.html filter-html.html
57 xmlto -x MyStyle-nochunk-html.xsl html-nochunks filter-html.xml
58 /bin/mv -f filter-html.html filter.html
068aaea8 59 ./TidyHTML-filter
168e428f 60
9b371988
PH
61filter.txt: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
62 MyStyle.xsl
168e428f
PH
63 /bin/rm -rf filter-txt.html
64 xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
9b371988 65 w3m -dump filter-txt.html | ./Tidytxt >filter.txt
168e428f
PH
66
67# I have not found a way of making docbook2texi write its output anywhere
68# other than the file name that it makes up. The --to-stdout option does not
69# work.
70
9b371988
PH
71filter.info: filter-info.xml
72 docbook2texi filter-info.xml
168e428f
PH
73 perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
74 <exim_filtering.texi | Tidytxt >filter.texinfo
75 /bin/rm -rf exim_filtering.texi
76 makeinfo -o filter.info filter.texinfo
77
78########################################################################
79
80
81################################ SPEC ##################################
82
9b371988
PH
83spec.xml: spec.xfpt
84 xfpt spec.xfpt
168e428f
PH
85
86spec-fo.xml: spec.xml Pre-xml
9b371988 87 ./Pre-xml -optbreak <spec.xml >spec-fo.xml
168e428f
PH
88
89spec-html.xml: spec.xml Pre-xml
9b371988
PH
90 ./Pre-xml -html -oneindex \
91 <spec.xml >spec-html.xml
168e428f
PH
92
93spec-txt.xml: spec.xml Pre-xml
9b371988
PH
94 ./Pre-xml -ascii -html -noindex -quoteliteral \
95 <spec.xml >spec-txt.xml
96
97spec-info.xml: spec.xml Pre-xml
98 ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
168e428f 99
9b371988
PH
100spec.fo: spec-fo.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
101 MyTitleStyle.xsl
168e428f
PH
102 /bin/rm -rf spec.fo spec-fo.fo
103 xmlto -x MyStyle-spec-fo.xsl fo spec-fo.xml
104 /bin/mv -f spec-fo.fo spec.fo
105
deca074a
PH
106# Do not use pdf2ps from the PDF version; better PS is generated directly.
107
168e428f 108spec.ps: spec.fo
068aaea8
PH
109 FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
110 mv spec-tmp.ps spec.ps
168e428f 111
deca074a 112# Do not use ps2pdf from the PS version; better PDF is generated directly. It
9b371988
PH
113# contains cross links etc. We post-process it to add page label information
114# so that the page identifiers shown by acroread are the correct page numbers.
d1e83bff 115
9b371988 116spec.pdf: spec.fo PageLabelPDF
deca074a 117 FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
4f578862 118 ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf
168e428f 119
9b371988
PH
120spec.html: spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
121 MyStyle-html.xsl MyStyle.xsl
4f578862
PH
122 /bin/rm -rf spec_html
123 xmlto -x MyStyle-chunk-html.xsl -o spec_html html spec-html.xml
168e428f
PH
124 ./TidyHTML-spec
125
9b371988
PH
126spec.txt: spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
127 MyStyle.xsl
168e428f
PH
128 /bin/rm -rf spec-txt.html
129 xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
9b371988 130 w3m -dump spec-txt.html | ./Tidytxt >spec.txt
168e428f
PH
131
132# I have not found a way of making docbook2texi write its output anywhere
133# other than the file name that it makes up. The --to-stdout option does not
134# work.
135
9b371988
PH
136spec.info: spec-info.xml
137 docbook2texi spec-info.xml
4f578862 138 ./TidyInfo <the_exim_mta.texi >spec.texinfo
168e428f
PH
139 /bin/rm -rf the_exim_mta.texi
140 makeinfo -o spec.info spec.texinfo
141
142########################################################################
143
144
145################################ TEST ##################################
146
147# These targets (similar to the above) are for running little tests.
148
9b371988
PH
149test.xml: test.xfpt
150 xfpt test.xfpt
168e428f
PH
151
152test-fo.xml: test.xml Pre-xml
153 ./Pre-xml <test.xml >test-fo.xml
154
155test-html.xml: test.xml Pre-xml
9b371988 156 ./Pre-xml -html -oneindex <test.xml >test-html.xml
168e428f
PH
157
158test-txt.xml: test.xml Pre-xml
9b371988
PH
159 ./Pre-xml -ascii -html -noindex -quoteinfo \
160 <test.xml >test-txt.xml
161
162test-info.xml: test.xml Pre-xml
163 ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
168e428f 164
9b371988
PH
165test.fo: test-fo.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
166 MyTitleStyle.xsl
168e428f
PH
167 /bin/rm -rf test.fo test-fo.fo
168 xmlto -x MyStyle-spec-fo.xsl fo test-fo.xml
169 /bin/mv -f test-fo.fo test.fo
170
deca074a
PH
171# Do not use pdf2ps from the PDF version; better PS is generated directly.
172
168e428f 173test.ps: test.fo
068aaea8
PH
174 fop test.fo -ps test-tmp.ps
175 mv test-tmp.ps test.ps
168e428f 176
deca074a
PH
177# Do not use ps2pdf from the PS version; better PDF is generated directly. It
178# contains cross links etc.
d1e83bff 179
deca074a
PH
180test.pdf: test.fo
181 fop test.fo -pdf test-tmp.pdf
182 mv test-tmp.pdf test.pdf
168e428f 183
9b371988
PH
184test.html: test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
185 MyStyle.xsl
168e428f
PH
186 /bin/rm -rf test.html test-html.html
187 xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
188 /bin/mv -f test-html.html test.html
189
9b371988
PH
190test.txt: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
191 MyStyle.xsl
168e428f
PH
192 /bin/rm -rf test-txt.html
193 xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
194 w3m -dump test-txt.html | Tidytxt >test.txt
195
196# I have not found a way of making docbook2texi write its output anywhere
197# other than the file name that it makes up. The --to-stdout option does not
198# work.
199
9b371988
PH
200test.info: test-info.xml
201 docbook2texi test-info.xml
4f578862 202 ./TidyInfo <short_title.texi >test.texinfo
168e428f
PH
203 /bin/rm -rf short_title.texi
204 makeinfo -o test.info test.texinfo
205
206########################################################################
207
208
209################################ CLEAN #################################
210
211clean:; /bin/rm -rf exim.8 \
212 filter*.xml spec*.xml test*.xml \
213 *.fo *.html *.pdf *.ps \
214 filter*.txt spec*.txt test*.txt \
215 *.info* *.texinfo *.texi
216
217########################################################################