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