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