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