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