Remove Asciidoc versions of the documentation and building apparatus;
[exim.git] / doc / doc-docbook / Makefile
1 # $Cambridge: exim/doc/doc-docbook/Makefile,v 1.7 2006/02/01 11:01:01 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-fo.xml: filter.xml Pre-xml
25               ./Pre-xml -bookinfo <filter.xml >filter-fo.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-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
41 # Do not use pdf2ps from the PDF version; better PS is generated directly.
42
43 filter.ps:    filter.fo
44               fop filter.fo -ps filter-tmp.ps
45               mv filter-tmp.ps filter.ps
46
47 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
48 # contains cross links etc.
49
50 filter.pdf:   filter.fo
51               fop filter.fo -pdf filter-tmp.pdf
52               mv filter-tmp.pdf filter.pdf
53
54 filter.html:  filter-html.xml TidyHTML-filter MyStyle-nochunk-html.xsl \
55                 MyStyle-html.xsl MyStyle.xsl
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
59               ./TidyHTML-filter
60
61 filter.txt:   filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
62                 MyStyle.xsl
63               /bin/rm -rf filter-txt.html
64               xmlto -x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
65               w3m -dump filter-txt.html | ./Tidytxt >filter.txt
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
71 filter.info:  filter-info.xml
72               docbook2texi filter-info.xml
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
83 spec.xml:     spec.xfpt
84               xfpt spec.xfpt
85
86 spec-fo.xml:  spec.xml Pre-xml
87               ./Pre-xml -optbreak <spec.xml >spec-fo.xml
88
89 spec-html.xml: spec.xml Pre-xml
90               ./Pre-xml -html -oneindex \
91                 <spec.xml >spec-html.xml
92
93 spec-txt.xml: spec.xml Pre-xml
94               ./Pre-xml -ascii -html -noindex -quoteliteral \
95                 <spec.xml >spec-txt.xml
96
97 spec-info.xml: spec.xml Pre-xml
98               ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
99
100 spec.fo:      spec-fo.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
101               MyTitleStyle.xsl
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
106 # Do not use pdf2ps from the PDF version; better PS is generated directly.
107
108 spec.ps:      spec.fo
109               FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
110               mv spec-tmp.ps spec.ps
111
112 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
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.
115
116 spec.pdf:     spec.fo PageLabelPDF
117               FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
118               ./PageLabelPDF <spec-tmp.pdf >spec.pdf
119
120 spec.html:    spec-html.xml TidyHTML-spec MyStyle-chunk-html.xsl \
121                 MyStyle-html.xsl MyStyle.xsl
122               /bin/rm -rf spec.html
123               xmlto -x MyStyle-chunk-html.xsl -o spec.html html spec-html.xml
124               ./TidyHTML-spec
125
126 spec.txt:     spec-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
127                 MyStyle.xsl
128               /bin/rm -rf spec-txt.html
129               xmlto -x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
130               w3m -dump spec-txt.html | ./Tidytxt >spec.txt
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
136 spec.info:    spec-info.xml
137               docbook2texi spec-info.xml
138               perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
139                 <the_exim_mta.texi >spec.texinfo
140               /bin/rm -rf the_exim_mta.texi
141               makeinfo -o spec.info spec.texinfo
142
143 ########################################################################
144
145
146 ################################ TEST ##################################
147
148 # These targets (similar to the above)  are for running little tests.
149
150 test.xml:     test.xfpt
151               xfpt test.xfpt
152
153 test-fo.xml:  test.xml Pre-xml
154               ./Pre-xml <test.xml >test-fo.xml
155
156 test-html.xml: test.xml Pre-xml
157               ./Pre-xml -html -oneindex <test.xml >test-html.xml
158
159 test-txt.xml: test.xml Pre-xml
160               ./Pre-xml -ascii -html -noindex -quoteinfo \
161                 <test.xml >test-txt.xml
162
163 test-info.xml: test.xml Pre-xml
164               ./Pre-xml -ascii -html -noindex <test.xml >test-info.xml
165
166 test.fo:      test-fo.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
167                 MyTitleStyle.xsl
168               /bin/rm -rf test.fo test-fo.fo
169               xmlto -x MyStyle-spec-fo.xsl fo test-fo.xml
170               /bin/mv -f test-fo.fo test.fo
171
172 # Do not use pdf2ps from the PDF version; better PS is generated directly.
173
174 test.ps:      test.fo
175               fop test.fo -ps test-tmp.ps
176               mv test-tmp.ps test.ps
177
178 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
179 # contains cross links etc.
180
181 test.pdf:     test.fo
182               fop test.fo -pdf test-tmp.pdf
183               mv test-tmp.pdf test.pdf
184
185 test.html:    test-html.xml MyStyle-nochunk-html.xsl MyStyle-html.xsl \
186                 MyStyle.xsl
187               /bin/rm -rf test.html test-html.html
188               xmlto -x MyStyle-nochunk-html.xsl html-nochunks test-html.xml
189               /bin/mv -f test-html.html test.html
190
191 test.txt:     test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
192                 MyStyle.xsl
193               /bin/rm -rf test-txt.html
194               xmlto -x MyStyle-txt-html.xsl html-nochunks test-txt.xml
195               w3m -dump test-txt.html | Tidytxt >test.txt
196
197 # I have not found a way of making docbook2texi write its output anywhere
198 # other than the file name that it makes up. The --to-stdout option does not
199 # work.
200
201 test.info:    test-info.xml
202               docbook2texi test-info.xml
203               perl -ne 's/conceptindex/cindex/;s/optionindex/findex/;print;' \
204                 <short_title.texi >test.texinfo
205               /bin/rm -rf short_title.texi
206               makeinfo -o test.info test.texinfo
207
208 ########################################################################
209
210
211 ################################ CLEAN #################################
212
213 clean:; /bin/rm -rf exim.8 \
214               filter*.xml spec*.xml test*.xml \
215               *.fo *.html *.pdf *.ps \
216               filter*.txt spec*.txt test*.txt \
217               *.info* *.texinfo *.texi
218
219 ########################################################################