Commit | Line | Data |
---|---|---|
93c2028f NC |
1 | # |
2 | # Copyright (c) 1986 Regents of the University of California. | |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
f18ea9ba | 6 | # @(#)Makefile 6.3 (Berkeley) %G% |
93c2028f NC |
7 | # |
8 | # $Header: Makefile 1.4 83/07/21 21:27:16 sklower Exp $ | |
9 | # makefile for the franz lisp manual | |
10 | # | |
f18ea9ba JB |
11 | # sources: ${MacroSrc}: macros for the franz documents |
12 | # ${TMacSrc}: macros for typesetting franz documents | |
93c2028f NC |
13 | # ch1.n intro and description of types |
14 | # ch2.n data structure access | |
15 | # ch3.n on arithmetic functions. | |
16 | # ch4.n special functions. | |
17 | # ch5.n i/o | |
18 | # ch6.n system functions | |
19 | # ch7.n reader | |
20 | # ch8.n functions and macros | |
21 | # ch9.n arrays | |
22 | # ch10.n exception handling | |
23 | # ch11.n trace package | |
24 | # ch12.n liszt | |
25 | # ch13.n cmu top level | |
26 | # ch14.n stepper | |
27 | # ch15.n fixit package | |
28 | # ch16.n lisp editor | |
da0c501d | 29 | # ch17.n hash tables |
93c2028f NC |
30 | # chb.n special symbols |
31 | # chc.n short subjects | |
32 | ||
33 | ||
34 | .SUFFIXES: .n .t .x .v .r .rx .q .qx .sp | |
35 | ||
36 | # the syntax's have this meaning: | |
37 | # .n nroff/troff source file | |
38 | # .t troff output file, can be vpr -t 'ed | |
39 | # .x index file from a troff run, when collected and run through troff | |
40 | # again, an index is produced. | |
41 | # .v this file never exists, but asking for it will cause a .t file to | |
42 | # be created and then vpr'ed. the .t file will not be deleted. | |
43 | # .p this file also never exists, but asking for it will cause TROFF | |
44 | # (usually vtroff or itroff) to be run directly on the file, leaving | |
45 | # no .t around. This is used in /usr/doc for people who want to | |
46 | # run off a manual and are too lazy to read this makefile. | |
47 | # .r nroff output file. | |
48 | # .rx special index output from nroff run. These files should be catted | |
49 | # together and then left around for lisp to read when given the help | |
50 | # command. | |
51 | # | |
52 | # .q nroff output file compatible with model 37 | |
53 | # .qx index file for .q files. | |
54 | # | |
55 | # .sp spell errors | |
56 | # | |
57 | # make install will install the nroff versions of the manual in the | |
58 | # directory (LibDir/manual) where the auxfns0.l help command can find them. | |
59 | # | |
60 | LibDir = /usr/lib/lisp | |
61 | CcodeDir = ../franz | |
62 | CopyTo = /dev/null | |
63 | TROFF= ditroff | |
64 | TBL= dtbl | |
65 | NROFF= nroff | |
da0c501d JB |
66 | PRINTER = -Pdp |
67 | O = | |
93c2028f NC |
68 | Append = ${LibDir}/append |
69 | # Rmt = is unecessary; you can say, make rall NROFF="'dali nroff'". | |
70 | # better to just copy the doc directory to the remote machine and | |
71 | # run it all there. | |
72 | ||
73 | #--- Sources: | |
74 | # We use the suffixes to tell make how to make a file. Thus | |
75 | # we only specify the root and let the append function add the | |
76 | # appropriate suffix. | |
77 | ||
78 | MacroSrc = lmacs | |
f18ea9ba | 79 | TMacSrc = tmacs |
93c2028f NC |
80 | |
81 | RootGenSrc = ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch61 ch7 ch8 \ | |
82 | ch9 ch10 ch11 ch12 ch13 ch14 ch15 ch16 ch17 chb chc | |
83 | ||
da0c501d JB |
84 | DocSrc= ch0.n ch1.n ch2.n ch3.n ch4.n ch5.n ch6.n ch7.n ch8.n \ |
85 | ch9.n ch10.n ch11.n ch12.n ch13.n ch14.n ch15.n ch16.n ch17.n | |
86 | ||
87 | DocApp= chb.n chc.n | |
88 | ||
93c2028f NC |
89 | UtilSrc = Makefile indexsed mantags extrnames.awk fixmks.sed \ |
90 | franz.n | |
91 | ||
92 | #-- can't get a expression for all source at make read time. must use | |
93 | # append to add .n to RootGenSrc | |
94 | ||
95 | ||
da0c501d JB |
96 | doc: paper app |
97 | ||
98 | paper: paper.${PRINTER} | |
99 | lpr ${PRINTER} -n paper.${PRINTER} | |
100 | ||
f18ea9ba JB |
101 | paper.${PRINTER}: ${DocSrc} ${TMacSrc} |
102 | ${TBL} ${PRINTER} ${TMacSrc} ${DocSrc} | \ | |
da0c501d JB |
103 | ${TROFF} -t -me 1> paper.${PRINTER} 2> tindex |
104 | ||
105 | app: app.${PRINTER} | |
106 | lpr ${PRINTER} -n app.${PRINTER} | |
107 | ||
f18ea9ba | 108 | app.${PRINTER}: tindex ${TMacSrc} ${DocApp} |
da0c501d | 109 | echo ".Ib" | sort +2 tindex - | sed -f indexsed | \ |
f18ea9ba | 110 | ${TROFF} -t -me ${TMacSrc} - ${DocApp} > app.${PRINTER} |
da0c501d | 111 | |
93c2028f | 112 | all: |
da0c501d | 113 | make rall |
93c2028f NC |
114 | |
115 | rall: ${Append} | |
116 | make NROFF=${NROFF} O=${O} `${Append} .r ${RootGenSrc}` helpindex | |
117 | ||
118 | vall: ${Append} | |
119 | make TROFF=${TROFF} O=${O} `${Append} .v ${RootGenSrc}` index.v | |
120 | ||
121 | tall: ${Append} | |
122 | make TROFF=${TROFF} O=${O} `${Append} .t ${RootGenSrc}` index.t | |
123 | ||
124 | cctall: | |
125 | make TROFF="troff -s12" tall | |
126 | ||
127 | pall: ${Append} | |
128 | make TROFF=${TROFF} O=${O} `${Append} .p ${RootGenSrc}` pindex | |
129 | ||
130 | troff: pall | |
131 | ||
132 | qall: ${Append} | |
133 | make NROFF=${NROFF} O=${O} `${Append} .q ${RootGenSrc}` index.t | |
134 | ||
135 | spall: ${Append} | |
136 | make TROFF=${TROFF} O=${O} `${Append} .q ${RootGenSrc}` index.t | |
137 | ||
138 | # only a few files describe functions which are indexed. | |
139 | ||
140 | .t.v: | |
da0c501d | 141 | lpr ${PRINTER} -n $*.t |
93c2028f NC |
142 | |
143 | .n.t: | |
f18ea9ba | 144 | ${TBL} ${PRINTER} ${MacroSrc} $*.n | \ |
da0c501d | 145 | ${TROFF} -me ${O} ${PRINTER} -t 1> $*.t 2> $*.x |
93c2028f NC |
146 | |
147 | .n.p: | |
f18ea9ba | 148 | ${TBL} ${PRINTER} ${MacroSrc} $*.n | ${TROFF} -me ${O} ${PRINTER} 2> $*.x |
93c2028f NC |
149 | |
150 | .n.x: | |
f18ea9ba | 151 | ${TBL} ${PRINTER} ${MacroSrc} $*.n | ${TROFF} -me ${O} ${PRINTER} -z 2> $*.x |
93c2028f NC |
152 | |
153 | .n.r: | |
f18ea9ba | 154 | tbl ${MacroSrc} $*.n | ${NROFF} -rb3 -me ${O} 1> $*.r 2> $*.rx |
93c2028f NC |
155 | rm -f helpindex |
156 | ||
157 | .n.rx: | |
f18ea9ba | 158 | tbl ${MacroSrc} $*.n | ${NROFF} -rb3 -me ${O} 1> $*.r 2> $*.rx |
93c2028f NC |
159 | rm -f helpindex |
160 | ||
161 | .n.q: | |
f18ea9ba | 162 | tbl ${MacroSrc} $*.n | ${NROFF} -me -T37 ${O} 2> $*.qx | col > $*.q |
93c2028f NC |
163 | |
164 | .n.sp: | |
165 | spell $*.n > $*.sp | |
166 | ||
167 | install: | |
168 | make O=${O} rall | |
169 | cp `${Append} .r ${RootGenSrc}` helpindex ${LibDir}/manual | |
170 | ||
171 | clean: | |
da0c501d | 172 | -rm -f paper.-[PT]* app.-[PT]* errs Errs make.out |
93c2028f NC |
173 | -rm -f *.r |
174 | -rm -f *.rx | |
175 | -rm -f helpindex | |
da0c501d | 176 | -rm -f tindex |
93c2028f NC |
177 | -rm -f *.t |
178 | -rm -f *.q | |
179 | -rm -f *.x | |
180 | ||
181 | ||
182 | findex: ${Append} | |
183 | make `${Append} .x ${RootGenSrc}` | |
184 | echo ".Ib" > index | |
185 | sort +3 -o index index `${Append} .x ${RootGenSrc}` | |
186 | sed -f indexsed index > indexx | |
f18ea9ba | 187 | ${Rmt} ${TROFF} -me ${MacroSrc} indexx |
93c2028f NC |
188 | |
189 | index.t: | |
190 | make `${Append} .x ${RootGenSrc}` | |
191 | echo ".Ib" > index | |
192 | sort +3 -o index index `${Append} .x ${RootGenSrc}` | |
193 | sed -f indexsed index > indexx | |
f18ea9ba | 194 | ${TROFF} -me -x -t ${MacroSrc} indexx > index.t |
93c2028f NC |
195 | |
196 | pindex: ${Append} | |
197 | make `${Append} .x ${RootGenSrc}` | |
198 | echo ".Ib" > index | |
199 | sort +3 -o index index `${Append} .x ${RootGenSrc}` | |
200 | sed -f indexsed index > indexx | |
f18ea9ba | 201 | ${TROFF} -me ${MacroSrc} indexx |
93c2028f NC |
202 | |
203 | helpindex: ${Append} | |
204 | make `${Append} .rx ${RootGenSrc}` | |
205 | cat `${Append} .rx ${RootGenSrc}` | tr '\227' ' ' > helpindex | |
206 | ||
207 | tags: /dev/tty ${Append} | |
208 | awk -f mantags `${Append} .n ${RootGenSrc}` | sort > tags | |
209 | ||
210 | ||
211 | ${Append}: | |
212 | (cd ../utils ; make LibDir=${LibDir} ${Append}) | |
213 | ||
214 | # to create a database for lxref to use: | |
215 | C-database: ${CcodeDir}/sysat.c | |
216 | grep "^ MK" ${CcodeDir}/sysat.c > mks | |
217 | sed -f fixmks.sed < mks > mks.fixed | |
218 | (echo "(Chome)" ; cat mks.fixed ) > C-database | |
219 | rm -f mks mks.fixed | |
220 | ||
221 | doc-database: | |
222 | awk -f extrnames.awk `${Append} .n ${RootGenSrc}`\ | |
223 | | sed -f fixmks.sed > doc-database | |
224 | ||
225 | ||
226 | bigxref: C-database doc-database | |
227 | ${Append} -p ${LibDir}/ `(cd ${LibDir} ; make echorequired)` | \ | |
228 | sed 's/\.l/.x/g' > lisplibfiles | |
229 | lxref doc-database C-database `cat lisplibfiles` > bigxref | |
230 | ||
231 | # simple table of contents, just a listing of which function is | |
232 | # documented in which chapter | |
233 | tofc: | |
234 | egrep "^.Lc|^.Lf|^.Lx|^.sh" `${Append} .n ${RootGenSrc}` > tofc | |
235 | ||
236 | ||
237 | copysource: | |
f18ea9ba JB |
238 | (tar cf - ${MacroSrc} ${TMacSrc} `${Append} .n ${RootGenSrc}` \ |
239 | ${UtilSrc} | (cd ${CopyTo} ; tar xf -)) | |
93c2028f NC |
240 | |
241 | scriptcatall: ${AllSrc} ${Append} | |
242 | @(cd .. ; scriptcat doc doc ${MacroSrc} `${Append} .n ${RootGenSrc}` ${UtilSrc}) | |
243 | @(cd .. ; scriptcat doc lisplib/manual \ | |
244 | `${Append} .r ${RootGenSrc}` helpindex) | |
245 | ||
246 | copymanual: ${Append} | |
247 | ( cd ${FromDir}/manual ; \ | |
248 | cp `${Append} .r ${RootGenSrc}` helpindex ${CopyTo}) | |
249 | ||
250 |