1 # Make file for Exim documentation from xfpt source.
4 notarget
:; @echo
"** You must specify a target, in the form x.y, where x is 'filter', 'spec',"
5 @echo
"** or 'test', and y is 'xml', 'fo', 'ps', 'pdf', 'html', 'txt', or 'info'."
6 @echo
"** One other possible targets 'exim.8', 'spec.utf8'".
10 ############################# EVERYTHING ###############################
12 # Generate all the documentation files...
14 ## removed info files as I cannot generate them - spec.info filter.info
15 ## removed html files as superseded by new website code
16 everything
: spec.pdf spec.ps spec.txt \
17 filter.pdf
filter.ps
filter.txt \
20 ############################## MAN PAGE ################################
22 exim
.8: spec.xml x2man
25 ########################################################################
27 # .PHONY doesn't work here, because it forces a rebuild of all dependent
28 # targets, always. It sets the internal timestamp of its target to
30 # But it may happen that local_params does not change
32 local_params
: FORCE GenLocalParams
34 trap
'rm -f $$tmp' EXIT
; \
36 .
/GenLocalParams
$$tmp; \
37 cmp
-s
$@
$$tmp || mv
-f
$$tmp $@
39 ############################### FILTER #################################
41 filter.xml
: local_params
filter.xfpt
44 filter-pr.xml
: filter.xml Pre-xml
45 .
/Pre-xml
-bookinfo
<filter.xml
>filter-pr.xml
47 filter-txt.xml
: filter.xml Pre-xml
48 .
/Pre-xml
-ascii
-html
-quoteliteral
<filter.xml
>filter-txt.xml
50 filter-info.xml
: filter.xml Pre-xml
51 .
/Pre-xml
-ascii
-html
<filter.xml
>filter-info.xml
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
58 # Do not use pdf2ps from the PDF version; better PS is generated directly.
61 ### PS/PDF generation using fop
64 fop-filter.ps
: filter.fo
65 fop
filter.fo
-ps filter-tmp.ps
66 mv filter-tmp.ps
filter.ps
68 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
69 # contains cross links etc.
71 fop-filter.pdf
: filter.fo PageLabelPDF
72 fop
filter.fo
-pdf filter-tmp.pdf
73 .
/PageLabelPDF
2 <filter-tmp.pdf
>filter.pdf
76 ### PS/PDF generation using SDoP
79 sdop-filter.ps
: filter-pr.xml
80 sdop
-o
filter.ps filter-pr.xml
82 sdop-filter.pdf
: filter.ps
83 ps2pdf
filter.ps
filter.pdf
86 ### PS/PDF default setting
89 filter.ps
: sdop-filter.ps
91 filter.pdf
: sdop-filter.pdf
96 filter.txt
: filter-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
98 /bin
/rm -rf filter-txt.html
99 xmlto
-x MyStyle-txt-html.xsl html-nochunks filter-txt.xml
100 command
-v w3m
>/dev
/null
101 LC_ALL
=C w3m
-dump filter-txt.html | .
/Tidytxt
>filter.txt
102 .
/SanityTestText
filter.txt
104 # I have not found a way of making docbook2texi write its output anywhere
105 # other than the file name that it makes up. The --to-stdout option does not
108 filter.
info: filter-info.xml
109 docbook2texi filter-info.xml
110 perl
-ne
's/conceptindex/cindex/;s/optionindex/findex/;print;' \
111 <exim_filtering.texi | .
/Tidytxt
>filter.texinfo
112 /bin
/rm -rf exim_filtering.texi
113 makeinfo -o
filter.
info filter.texinfo
115 ########################################################################
118 ################################ SPEC ##################################
120 spec.xml
: spec.xfpt local_params
123 spec-pr.xml
: spec.xml Pre-xml
124 .
/Pre-xml
-optbreak
<spec.xml
>spec-pr.xml
126 spec-txt.xml
: spec.xml Pre-xml
127 .
/Pre-xml
-ascii
-html
-noindex
-quoteliteral \
128 <spec.xml
>spec-txt.xml
130 spec-info.xml
: spec.xml Pre-xml
131 .
/Pre-xml
-ascii
-html
-noindex
<spec.xml
>spec-info.xml
133 spec.fo
: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
135 /bin
/rm -rf spec.fo spec-pr.fo
136 xmlto
-x MyStyle-spec-fo.xsl fo spec-pr.xml
137 /bin
/mv
-f spec-pr.fo spec.fo
140 ### PS/PDF generation using fop
143 # Do not use pdf2ps from the PDF version; better PS is generated directly.
146 FOP_OPTS
=-Xmx512m fop spec.fo
-ps spec-tmp.ps
147 mv spec-tmp.ps spec.ps
149 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
150 # contains cross links etc. We post-process it to add page label information
151 # so that the page identifiers shown by acroread are the correct page numbers.
153 fop-spec.pdf
: spec.fo PageLabelPDF
154 FOP_OPTS
=-Xmx512m fop spec.fo
-pdf spec-tmp.pdf
155 .
/PageLabelPDF
12 <spec-tmp.pdf
>spec.pdf
158 ### PS/PDF generation using SDoP
161 sdop-spec.ps
: spec-pr.xml
162 sdop
-o spec.ps spec-pr.xml
164 sdop-spec.pdf
: spec.ps
165 ps2pdf spec.ps spec.pdf
168 ### PS/PDF default setting
171 spec.ps
: sdop-spec.ps
173 spec.pdf
: sdop-spec.pdf
178 spec-txt.html
: spec-txt.xml \
179 MyStyle-txt-html.xsl MyStyle-html.xsl MyStyle.xsl
180 xmlto
-x MyStyle-txt-html.xsl html-nochunks spec-txt.xml
182 spec.utf8
: spec-txt.html Tidytxt
183 @grep
-iq
'LC_CTYPE=.*utf-\?8' local_params ||
{ \
184 echo
'your current locale does not support UTF-8' >&2; \
186 command
-v w3m
>/dev
/null
187 w3m
-dump spec-txt.html | .
/Tidytxt
-utf8
>$@
189 spec.txt
: spec-txt.html Tidytxt
190 command
-v w3m
>/dev
/null
191 LC_ALL
=C w3m
-dump spec-txt.html | .
/Tidytxt
>$@
192 .
/SanityTestText spec.txt
195 # I have not found a way of making docbook2texi write its output anywhere
196 # other than the file name that it makes up. The --to-stdout option does not
199 spec.
info: spec-info.xml
200 docbook2texi spec-info.xml
201 .
/TidyInfo
<the_exim_mta.texi
>spec.texinfo
202 /bin
/rm -rf the_exim_mta.texi
203 makeinfo -o spec.
info --no-split spec.texinfo
205 ########################################################################
208 ################################ TEST ##################################
210 # These targets (similar to the above) are for running little tests.
215 test-pr.xml
: test.xml Pre-xml
216 .
/Pre-xml
<test.xml
>test-pr.xml
218 test-html.xml
: test.xml Pre-xml
219 .
/Pre-xml
-html
-oneindex
<test.xml
>test-html.xml
221 test-txt.xml
: test.xml Pre-xml
222 .
/Pre-xml
-ascii
-html
-noindex
-quoteinfo \
223 <test.xml
>test-txt.xml
225 test-info.xml
: test.xml Pre-xml
226 .
/Pre-xml
-ascii
-html
-noindex
<test.xml
>test-info.xml
228 test.fo
: test-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
230 /bin
/rm -rf
test.fo test-pr.fo
231 xmlto
-x MyStyle-spec-fo.xsl fo test-pr.xml
232 /bin
/mv
-f test-pr.fo
test.fo
235 ### PS/PDF generation using fop
238 # Do not use pdf2ps from the PDF version; better PS is generated directly.
241 fop
test.fo
-ps test-tmp.ps
242 mv test-tmp.ps
test.ps
244 # Do not use ps2pdf from the PS version; better PDF is generated directly. It
245 # contains cross links etc.
247 fop-test.pdf
: test.fo
248 fop
test.fo
-pdf test-tmp.pdf
249 mv test-tmp.pdf
test.pdf
252 ### PS/PDF generation using SDoP
255 sdop-test.ps
: test-pr.xml
256 sdop
-o
test.ps test-pr.xml
258 sdop-test.pdf
: test.ps
259 ps2pdf
test.ps
test.pdf
262 ### PS/PDF default setting
265 test.ps
: sdop-test.ps
267 test.pdf
: sdop-test.pdf
273 test.txt
: test-txt.xml Tidytxt MyStyle-txt-html.xsl MyStyle-html.xsl \
275 /bin
/rm -rf test-txt.html
276 xmlto
-x MyStyle-txt-html.xsl html-nochunks test-txt.xml
277 command
-v w3m
>/dev
/null
278 w3m
-dump test-txt.html | Tidytxt
>test.txt
280 # I have not found a way of making docbook2texi write its output anywhere
281 # other than the file name that it makes up. The --to-stdout option does not
284 test.
info: test-info.xml
285 docbook2texi test-info.xml
286 .
/TidyInfo
<short_title.texi
>test.texinfo
287 /bin
/rm -rf short_title.texi
288 makeinfo -o
test.
info test.texinfo
290 ########################################################################
293 ############################## OS FIXUP ################################
295 # Yes, we've advanced so far in text processing that we now have to
296 # hardcode in complete paths and so become dependent upon exactly where
297 # files were installed for xsl:import. Which of course varies by OS.
302 ########################################################################
305 ################################ CLEAN #################################
307 clean:; /bin
/rm -rf exim
.8 \
308 filter*.xml spec
*.xml
test*.xml \
310 filter*.html spec
*.html
test*.html \
311 filter*.txt spec
*.txt
test*.txt \
312 *.
info* *.texinfo
*.texi
314 ########################################################################