]> git.lizzy.rs Git - plan9front.git/blob - sys/doc/mkfile
merging erik quanstros nupas
[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         nupas/nupas\
44
45 ALLPS=${ALL:%=%.ps}
46 HTML=${ALL:%=%.html} release3.html release4.html
47 PDF=${ALL:%=%.pdf} release3.pdf release4.pdf
48 FILES=`{mkfilelist $ALL}
49 DIRS=`{mkdirlist $ALL}
50 NAMES=$FILES $DIRS
51
52 all:V: ${FILES:%=%.ps} dirs
53
54 dirs:V:
55         for(i in $DIRS) @{
56                 cd $i
57                 mk
58         }
59
60 print:V: $ALLPS
61         lp -H -i0 $prereq
62
63 title.ps:D:     title
64         troff $prereq | lp -dstdout > $target
65         cleanps $target
66
67 trademarks.ps:D:        /sys/lib/man/trademarks
68         troff $prereq | lp -dstdout > $target
69         cleanps $target
70
71 colophon.ps:D:  /sys/lib/man/colophon
72         troff $prereq | lp -dstdout > $target
73         cleanps $target
74
75 # troff gets some scary-looking errors but they're okay
76 %.ps:D: %.ms
77         mac=(-ms)
78         if(~ $stem comp utf 9 contents) mac=(-ms -mnihongo)
79         { echo $FONTS; cat $stem.ms } | pic | tbl | eqn | 
80                 troff $mac | lp -dstdout > $target
81         cleanps $target
82
83 %.trout:D:      %.ms
84         mac=(-ms)
85         if(~ $stem comp utf 9 contents) mac=($mac -mnihongo)
86         { echo $FONTS; cat $stem.ms } | pic | tbl | eqn | 
87                 troff $mac > $target
88
89 html:V: $HTML
90
91 9.trout 9.ps 9.html: network.pic
92
93 %.html: /$objtype/bin/htmlroff /sys/lib/tmac/tmac.s
94
95 index.html: contents.html
96         cp contents.html index.html
97
98 &.html:D:       &.ms
99         pic $stem.ms | tbl | eqn | htmlroff -ms -mhtml >$target
100
101 pdf:V: $PDF
102
103 ^(8½|acme|fs|il|net|sam|venti)/([^/]*\.(pdf|ps|html))'$':R:
104         cd $stem1
105         mk $stem2
106
107 ^(8½|acme|fs|il|net|sam|venti)\.html'$':R: \1/\1.html
108         cp $stem1/$stem1.html .
109
110 %.pdf: %.ps
111         cat docfonts $stem.ps >_$stem.ps
112         # distill _$stem.ps && mv _$stem.pdf $stem.pdf
113         ps2pdf _$stem.ps $stem.pdf && rm -f _$stem.ps
114
115 %.all:V:
116         mk $stem.ps $stem.pdf $stem.html
117
118 %.install:V: %.html
119         9fs other
120         files=`{ls $stem.html $stem^*.png $stem/*.png $stem/*.html >[2]/dev/null}
121         whatis stem
122         whatis files
123         cp $files /n/other/crp/sources.copy/sys/doc
124
125 %.page:V:       %.ps
126         page -w $stem.ps
127
128 install:V: ${NAMES:%=%.install} release4.install release3.install
129
130 # ignore these
131 IGNHTML=title trademarks colophon troff
132 IGN=${IGNHTML:%=%.html} ${IGNHTML:%=%.install}
133
134 $IGN:QV:
135         # nothing
136