]> git.lizzy.rs Git - plan9front.git/blob - sys/doc/mkfile
merge
[plan9front.git] / sys / doc / mkfile
1 # Changes made in this directory are invisible to the
2 # external web server.  To publish changed documents
3 # to the external web server, mk install or name.install
4 # To publish changed ps/pdf files, see the install rule.
5
6 < /sys/doc/fonts
7 NPROC = 1
8
9 ALL=\
10         title\
11         trademarks\
12         contents\
13         9\
14         names\
15         net/net\
16         auth\
17         comp\
18         prog4\
19         ape\
20         acidpaper\
21         acid\
22         mk\
23         mkfiles\
24         asm\
25         8½/8½\
26         rc\
27         sam/sam\
28         acme/acme\
29         plumb\
30         utf\
31         compiler\
32         libmach\
33         fs/fs\
34         venti/venti\
35         il/il\
36         lexnames\
37         sleep\
38         lp\
39         troff\
40         spin\
41         port\
42         colophon\
43
44 ALLPS=${ALL:%=%.ps}
45 HTML=${ALL:%=%.html} release3.html release4.html
46 PDF=${ALL:%=%.pdf} release3.pdf release4.pdf
47 FILES=`{mkfilelist $ALL}
48 DIRS=`{mkdirlist $ALL}
49 NAMES=$FILES $DIRS
50
51 all:V: ${FILES:%=%.ps} dirs
52
53 dirs:V:
54         for(i in $DIRS) @{
55                 cd $i
56                 mk
57         }
58
59 print:V: $ALLPS
60         lp -H -i0 $prereq
61
62 title.ps:D:     title
63         troff $prereq | lp -dstdout > $target
64         cleanps $target
65
66 trademarks.ps:D:        /sys/lib/man/trademarks
67         troff $prereq | lp -dstdout > $target
68         cleanps $target
69
70 colophon.ps:D:  /sys/lib/man/colophon
71         troff $prereq | lp -dstdout > $target
72         cleanps $target
73
74 # troff gets some scary-looking errors but they're okay
75 %.ps:D: %.ms
76         mac=(-ms)
77         if(~ $stem comp utf 9 contents) mac=(-ms -mnihongo)
78         { echo $FONTS; cat $stem.ms } | pic | tbl | eqn | 
79                 troff $mac | lp -dstdout > $target
80         cleanps $target
81
82 %.trout:D:      %.ms
83         mac=(-ms)
84         if(~ $stem comp utf 9 contents) mac=($mac -mnihongo)
85         { echo $FONTS; cat $stem.ms } | pic | tbl | eqn | 
86                 troff $mac > $target
87
88 html:V: $HTML
89
90 9.trout 9.ps 9.html: network.pic
91
92 %.html: /$objtype/bin/htmlroff /sys/lib/tmac/tmac.s
93
94 index.html: contents.html
95         cp contents.html index.html
96
97 &.html:D:       &.ms
98         pic $stem.ms | tbl | eqn | htmlroff -ms -mhtml >$target
99
100 pdf:V: $PDF
101
102 ^(8½|acme|fs|il|net|sam|venti)/([^/]*\.(pdf|ps|html))'$':R:
103         cd $stem1
104         mk $stem2
105
106 ^(8½|acme|fs|il|net|sam|venti)\.html'$':R: \1/\1.html
107         cp $stem1/$stem1.html .
108
109 %.pdf: %.ps
110         cat docfonts $stem.ps >_$stem.ps
111         # distill _$stem.ps && mv _$stem.pdf $stem.pdf
112         ps2pdf _$stem.ps $stem.pdf && rm -f _$stem.ps
113
114 %.all:V:
115         mk $stem.ps $stem.pdf $stem.html
116
117 %.install:V: %.html
118         9fs other
119         files=`{ls $stem.html $stem^*.png $stem/*.png $stem/*.html >[2]/dev/null}
120         whatis stem
121         whatis files
122         cp $files /n/other/crp/sources.copy/sys/doc
123
124 %.page:V:       %.ps
125         page -w $stem.ps
126
127 install:V: ${NAMES:%=%.install} release4.install release3.install
128
129 # ignore these
130 IGNHTML=title trademarks colophon troff
131 IGN=${IGNHTML:%=%.html} ${IGNHTML:%=%.install}
132
133 $IGN:QV:
134         # nothing
135