Debian Codegraph @

doc/Makefile

raw
1 #
2 # Makefile for the Intercal documentation
3 #
4
5 # Making the original manual:
6 # To see the Revised Manual, generate intercal.txt or intercal.ps
7 # To see the original INTERCAL-72 manual, generate original.txt or original.ps.
8
9 # Making the Revamped Manual:
10 # generate ick.inf, ickhtml (will be placed into a directory),
11 # ick.htm (all in one file), ick.pdf, or ick.txt.
12
13 # We make two passes in order to resolve SETR/GETNH references.
14 # The sed hackery strips the trailing dots from level 1 section references.
15
16 all: allorig allnew
17
18 allorig: intercal.ps intercal.txt original.ps original.txt
19
20 allnew: ick.inf ickhtml ick.htm ick.txt ick.pdf
21
22 intercal.ps: intercal.mm
23 groff -U -dc=y -Tps -p -t -mm intercal.mm >intercal.refs.tmp
24 sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
25 mv tmp.refs intercal.refs.tmp
26 groff -U -dc=y -Tps -p -t -mm intercal.mm >intercal.ps
27 -rm -f intercal.refs.qrf intercal.refs.tmp
28
29 original.ps: intercal.mm
30 groff -U -dc=n -Tps -p -t -mm intercal.mm >intercal.refs.tmp
31 sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
32 mv tmp.refs intercal.refs.tmp
33 groff -U -dc=n -Tps -p -t -mm intercal.mm >original.ps
34 -rm -f intercal.refs.qrf intercal.refs.tmp
35
36 intercal.txt: intercal.mm
37 groff -U -dc=y -Tascii -p -t -mm intercal.mm >intercal.refs.tmp
38 sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
39 mv tmp.refs intercal.refs.tmp
40 GROFF_NO_SGR=1 groff -U -dc=y -Tascii -p -t -mm intercal.mm >intercal.txt
41 -rm -f intercal.refs.qrf intercal.refs.tmp
42
43 original.txt: intercal.mm
44 groff -U -dc=n -Tascii -p -t -mm intercal.mm >intercal.refs.tmp
45 sed <intercal.refs.tmp -e '/hn \([0-9]*\)\.$$/s//hn \1/' >tmp.refs;
46 mv tmp.refs intercal.refs.tmp
47 GROFF_NO_SGR=1 groff -U -dc=n -Tascii -p -t -mm intercal.mm >original.txt
48 -rm -f intercal.refs.qrf intercal.refs.tmp
49
50 # Don't delete *.txt here - not while we have asciidoc text masters, anyway
51 clean:
52 rm -f *.ps *.refs* ick.in* ick.txt RFC-DRAFT.txt ick.htm ick.pdf *.tmp
53 rm -rf html
54
55 ick.inf: ick.txi fdl-1-2.txi
56 makeinfo -o ick.info ick.txi
57 -mv ick.info ick.inf
58
59 RFC-DRAFT.txt: RFC-DRAFT.roff
60 groff -Tascii RFC-DRAFT.roff | col -x -b >RFC-DRAFT.txt
61
62 # The --css-include is skipped here because it seems to cause makeinfo
63 # to leak open file space, and it fails with an EMFILE error. Instead,
64 # fix83.pl (which changes filenames to 8.3 format, among other things)
65 # is used to add the styling. Tidy is run to clean up the output if
66 # available, but if it isn't, that isn't a problem; there will just be
67 # a harmless warning.
68 ickhtml:html/index.htm
69
70 html/index.htm: ick.txi ickstyle.css fdl-1-2.txi tidy.cfg
71 rm -rf html
72 makeinfo --html -o html ick.txi
73 ls -1 html | perl -w fix83.pl | sh
74 perl -i.tmp -w fix83.pl html/*.htm
75 chmod u+w html/*.htm
76 -tidy -config tidy.cfg -m html/*.htm || :
77 rm html/*.tmp
78
79 # fixtoc.pl is used here to reformat the TOC to look good under the
80 # multiple-part system (which makeinfo doesn't really know about).
81 ick.htm: ick.txi ickstyle.css fdl-1-2.txi tidy.cfg
82 makeinfo --html --no-split --no-header --css-include=ickstyle.css -D notsplit -o ick.htm ick.txi
83 -perl -i.tmp -w fixtoc.pl ick.htm
84 rm ick*.tmp
85 chmod u+w ick.htm
86 -tidy -config tidy.cfg -m ick.htm || :
87
88 # For some reason, ick.htm comes out of this readonly sometimes, which
89 # is why the chmod seems to be needed. No idea why, though.
90
91 ick.txt: ick.txi fdl-1-2.txi
92 makeinfo --plaintext -D notsplit -o ick.txt ick.txi
93 ick.pdf: ick.txi fdl-1-2.txi
94 -texi2dvi -b -c -e -p -q ick.txi