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 | # | |
ba88f644 | 6 | # @(#)Makefile 6.4 (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 | |
ba88f644 | 112 | all: rall |
93c2028f NC |
113 | |
114 | rall: ${Append} | |
115 | make NROFF=${NROFF} O=${O} `${Append} .r ${RootGenSrc}` helpindex | |
116 | ||
117 | vall: ${Append} | |
118 | make TROFF=${TROFF} O=${O} `${Append} .v ${RootGenSrc}` index.v | |
119 | ||
120 | tall: ${Append} | |
121 | make TROFF=${TROFF} O=${O} `${Append} .t ${RootGenSrc}` index.t | |
122 | ||
123 | cctall: | |
124 | make TROFF="troff -s12" tall | |
125 | ||
126 | pall: ${Append} | |
127 | make TROFF=${TROFF} O=${O} `${Append} .p ${RootGenSrc}` pindex | |
128 | ||
129 | troff: pall | |
130 | ||
131 | qall: ${Append} | |
132 | make NROFF=${NROFF} O=${O} `${Append} .q ${RootGenSrc}` index.t | |
133 | ||
134 | spall: ${Append} | |
135 | make TROFF=${TROFF} O=${O} `${Append} .q ${RootGenSrc}` index.t | |
136 | ||
137 | # only a few files describe functions which are indexed. | |
138 | ||
139 | .t.v: | |
da0c501d | 140 | lpr ${PRINTER} -n $*.t |
93c2028f NC |
141 | |
142 | .n.t: | |
f18ea9ba | 143 | ${TBL} ${PRINTER} ${MacroSrc} $*.n | \ |
da0c501d | 144 | ${TROFF} -me ${O} ${PRINTER} -t 1> $*.t 2> $*.x |
93c2028f NC |
145 | |
146 | .n.p: | |
f18ea9ba | 147 | ${TBL} ${PRINTER} ${MacroSrc} $*.n | ${TROFF} -me ${O} ${PRINTER} 2> $*.x |
93c2028f NC |
148 | |
149 | .n.x: | |
f18ea9ba | 150 | ${TBL} ${PRINTER} ${MacroSrc} $*.n | ${TROFF} -me ${O} ${PRINTER} -z 2> $*.x |
93c2028f NC |
151 | |
152 | .n.r: | |
f18ea9ba | 153 | tbl ${MacroSrc} $*.n | ${NROFF} -rb3 -me ${O} 1> $*.r 2> $*.rx |
93c2028f NC |
154 | rm -f helpindex |
155 | ||
156 | .n.rx: | |
f18ea9ba | 157 | tbl ${MacroSrc} $*.n | ${NROFF} -rb3 -me ${O} 1> $*.r 2> $*.rx |
93c2028f NC |
158 | rm -f helpindex |
159 | ||
160 | .n.q: | |
f18ea9ba | 161 | tbl ${MacroSrc} $*.n | ${NROFF} -me -T37 ${O} 2> $*.qx | col > $*.q |
93c2028f NC |
162 | |
163 | .n.sp: | |
164 | spell $*.n > $*.sp | |
165 | ||
ba88f644 MK |
166 | install: rall |
167 | -mkdir ${LibDir}/manual | |
93c2028f NC |
168 | cp `${Append} .r ${RootGenSrc}` helpindex ${LibDir}/manual |
169 | ||
170 | clean: | |
da0c501d | 171 | -rm -f paper.-[PT]* app.-[PT]* errs Errs make.out |
93c2028f NC |
172 | -rm -f *.r |
173 | -rm -f *.rx | |
174 | -rm -f helpindex | |
da0c501d | 175 | -rm -f tindex |
93c2028f NC |
176 | -rm -f *.t |
177 | -rm -f *.q | |
178 | -rm -f *.x | |
179 | ||
180 | ||
181 | findex: ${Append} | |
182 | make `${Append} .x ${RootGenSrc}` | |
183 | echo ".Ib" > index | |
184 | sort +3 -o index index `${Append} .x ${RootGenSrc}` | |
185 | sed -f indexsed index > indexx | |
f18ea9ba | 186 | ${Rmt} ${TROFF} -me ${MacroSrc} indexx |
93c2028f NC |
187 | |
188 | index.t: | |
189 | make `${Append} .x ${RootGenSrc}` | |
190 | echo ".Ib" > index | |
191 | sort +3 -o index index `${Append} .x ${RootGenSrc}` | |
192 | sed -f indexsed index > indexx | |
f18ea9ba | 193 | ${TROFF} -me -x -t ${MacroSrc} indexx > index.t |
93c2028f NC |
194 | |
195 | pindex: ${Append} | |
196 | make `${Append} .x ${RootGenSrc}` | |
197 | echo ".Ib" > index | |
198 | sort +3 -o index index `${Append} .x ${RootGenSrc}` | |
199 | sed -f indexsed index > indexx | |
f18ea9ba | 200 | ${TROFF} -me ${MacroSrc} indexx |
93c2028f NC |
201 | |
202 | helpindex: ${Append} | |
203 | make `${Append} .rx ${RootGenSrc}` | |
204 | cat `${Append} .rx ${RootGenSrc}` | tr '\227' ' ' > helpindex | |
205 | ||
206 | tags: /dev/tty ${Append} | |
207 | awk -f mantags `${Append} .n ${RootGenSrc}` | sort > tags | |
208 | ||
209 | ||
210 | ${Append}: | |
211 | (cd ../utils ; make LibDir=${LibDir} ${Append}) | |
212 | ||
213 | # to create a database for lxref to use: | |
214 | C-database: ${CcodeDir}/sysat.c | |
215 | grep "^ MK" ${CcodeDir}/sysat.c > mks | |
216 | sed -f fixmks.sed < mks > mks.fixed | |
217 | (echo "(Chome)" ; cat mks.fixed ) > C-database | |
218 | rm -f mks mks.fixed | |
219 | ||
220 | doc-database: | |
221 | awk -f extrnames.awk `${Append} .n ${RootGenSrc}`\ | |
222 | | sed -f fixmks.sed > doc-database | |
223 | ||
224 | ||
225 | bigxref: C-database doc-database | |
226 | ${Append} -p ${LibDir}/ `(cd ${LibDir} ; make echorequired)` | \ | |
227 | sed 's/\.l/.x/g' > lisplibfiles | |
228 | lxref doc-database C-database `cat lisplibfiles` > bigxref | |
229 | ||
230 | # simple table of contents, just a listing of which function is | |
231 | # documented in which chapter | |
232 | tofc: | |
233 | egrep "^.Lc|^.Lf|^.Lx|^.sh" `${Append} .n ${RootGenSrc}` > tofc | |
234 | ||
235 | ||
236 | copysource: | |
f18ea9ba JB |
237 | (tar cf - ${MacroSrc} ${TMacSrc} `${Append} .n ${RootGenSrc}` \ |
238 | ${UtilSrc} | (cd ${CopyTo} ; tar xf -)) | |
93c2028f NC |
239 | |
240 | scriptcatall: ${AllSrc} ${Append} | |
241 | @(cd .. ; scriptcat doc doc ${MacroSrc} `${Append} .n ${RootGenSrc}` ${UtilSrc}) | |
242 | @(cd .. ; scriptcat doc lisplib/manual \ | |
243 | `${Append} .r ${RootGenSrc}` helpindex) | |
244 | ||
245 | copymanual: ${Append} | |
246 | ( cd ${FromDir}/manual ; \ | |
247 | cp `${Append} .r ${RootGenSrc}` helpindex ${CopyTo}) | |
248 | ||
249 |