127613Scuccia# 227613Scuccia# Copyright (c) 1986 Regents of the University of California. 327613Scuccia# All rights reserved. The Berkeley software License Agreement 427613Scuccia# specifies the terms and conditions for redistribution. 527613Scuccia# 6*28152Sbloom# @(#)Makefile 6.3 (Berkeley) 05/14/86 727613Scuccia# 827613Scuccia# $Header: Makefile 1.4 83/07/21 21:27:16 sklower Exp $ 927613Scuccia# makefile for the franz lisp manual 1027613Scuccia# 11*28152Sbloom# sources: ${MacroSrc}: macros for the franz documents 12*28152Sbloom# ${TMacSrc}: macros for typesetting franz documents 1327613Scuccia# ch1.n intro and description of types 1427613Scuccia# ch2.n data structure access 1527613Scuccia# ch3.n on arithmetic functions. 1627613Scuccia# ch4.n special functions. 1727613Scuccia# ch5.n i/o 1827613Scuccia# ch6.n system functions 1927613Scuccia# ch7.n reader 2027613Scuccia# ch8.n functions and macros 2127613Scuccia# ch9.n arrays 2227613Scuccia# ch10.n exception handling 2327613Scuccia# ch11.n trace package 2427613Scuccia# ch12.n liszt 2527613Scuccia# ch13.n cmu top level 2627613Scuccia# ch14.n stepper 2727613Scuccia# ch15.n fixit package 2827613Scuccia# ch16.n lisp editor 2928150Sbloom# ch17.n hash tables 3027613Scuccia# chb.n special symbols 3127613Scuccia# chc.n short subjects 3227613Scuccia 3327613Scuccia 3427613Scuccia.SUFFIXES: .n .t .x .v .r .rx .q .qx .sp 3527613Scuccia 3627613Scuccia# the syntax's have this meaning: 3727613Scuccia# .n nroff/troff source file 3827613Scuccia# .t troff output file, can be vpr -t 'ed 3927613Scuccia# .x index file from a troff run, when collected and run through troff 4027613Scuccia# again, an index is produced. 4127613Scuccia# .v this file never exists, but asking for it will cause a .t file to 4227613Scuccia# be created and then vpr'ed. the .t file will not be deleted. 4327613Scuccia# .p this file also never exists, but asking for it will cause TROFF 4427613Scuccia# (usually vtroff or itroff) to be run directly on the file, leaving 4527613Scuccia# no .t around. This is used in /usr/doc for people who want to 4627613Scuccia# run off a manual and are too lazy to read this makefile. 4727613Scuccia# .r nroff output file. 4827613Scuccia# .rx special index output from nroff run. These files should be catted 4927613Scuccia# together and then left around for lisp to read when given the help 5027613Scuccia# command. 5127613Scuccia# 5227613Scuccia# .q nroff output file compatible with model 37 5327613Scuccia# .qx index file for .q files. 5427613Scuccia# 5527613Scuccia# .sp spell errors 5627613Scuccia# 5727613Scuccia# make install will install the nroff versions of the manual in the 5827613Scuccia# directory (LibDir/manual) where the auxfns0.l help command can find them. 5927613Scuccia# 6027613ScucciaLibDir = /usr/lib/lisp 6127613ScucciaCcodeDir = ../franz 6227613ScucciaCopyTo = /dev/null 6327613ScucciaTROFF= ditroff 6427613ScucciaTBL= dtbl 6527613ScucciaNROFF= nroff 6628150SbloomPRINTER = -Pdp 6728150SbloomO = 6827613ScucciaAppend = ${LibDir}/append 6927613Scuccia# Rmt = is unecessary; you can say, make rall NROFF="'dali nroff'". 7027613Scuccia# better to just copy the doc directory to the remote machine and 7127613Scuccia# run it all there. 7227613Scuccia 7327613Scuccia#--- Sources: 7427613Scuccia# We use the suffixes to tell make how to make a file. Thus 7527613Scuccia# we only specify the root and let the append function add the 7627613Scuccia# appropriate suffix. 7727613Scuccia 7827613ScucciaMacroSrc = lmacs 79*28152SbloomTMacSrc = tmacs 8027613Scuccia 8127613ScucciaRootGenSrc = ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch61 ch7 ch8 \ 8227613Scuccia ch9 ch10 ch11 ch12 ch13 ch14 ch15 ch16 ch17 chb chc 8327613Scuccia 8428150SbloomDocSrc= ch0.n ch1.n ch2.n ch3.n ch4.n ch5.n ch6.n ch7.n ch8.n \ 8528150Sbloom ch9.n ch10.n ch11.n ch12.n ch13.n ch14.n ch15.n ch16.n ch17.n 8628150Sbloom 8728150SbloomDocApp= chb.n chc.n 8828150Sbloom 8927613ScucciaUtilSrc = Makefile indexsed mantags extrnames.awk fixmks.sed \ 9027613Scuccia franz.n 9127613Scuccia 9227613Scuccia#-- can't get a expression for all source at make read time. must use 9327613Scuccia# append to add .n to RootGenSrc 9427613Scuccia 9527613Scuccia 9628150Sbloomdoc: paper app 9728150Sbloom 9828150Sbloompaper: paper.${PRINTER} 9928150Sbloom lpr ${PRINTER} -n paper.${PRINTER} 10028150Sbloom 101*28152Sbloompaper.${PRINTER}: ${DocSrc} ${TMacSrc} 102*28152Sbloom ${TBL} ${PRINTER} ${TMacSrc} ${DocSrc} | \ 10328150Sbloom ${TROFF} -t -me 1> paper.${PRINTER} 2> tindex 10428150Sbloom 10528150Sbloomapp: app.${PRINTER} 10628150Sbloom lpr ${PRINTER} -n app.${PRINTER} 10728150Sbloom 108*28152Sbloomapp.${PRINTER}: tindex ${TMacSrc} ${DocApp} 10928150Sbloom echo ".Ib" | sort +2 tindex - | sed -f indexsed | \ 110*28152Sbloom ${TROFF} -t -me ${TMacSrc} - ${DocApp} > app.${PRINTER} 11128150Sbloom 11227613Scucciaall: 11328150Sbloom make rall 11427613Scuccia 11527613Scucciarall: ${Append} 11627613Scuccia make NROFF=${NROFF} O=${O} `${Append} .r ${RootGenSrc}` helpindex 11727613Scuccia 11827613Scucciavall: ${Append} 11927613Scuccia make TROFF=${TROFF} O=${O} `${Append} .v ${RootGenSrc}` index.v 12027613Scuccia 12127613Scucciatall: ${Append} 12227613Scuccia make TROFF=${TROFF} O=${O} `${Append} .t ${RootGenSrc}` index.t 12327613Scuccia 12427613Scucciacctall: 12527613Scuccia make TROFF="troff -s12" tall 12627613Scuccia 12727613Scucciapall: ${Append} 12827613Scuccia make TROFF=${TROFF} O=${O} `${Append} .p ${RootGenSrc}` pindex 12927613Scuccia 13027613Scucciatroff: pall 13127613Scuccia 13227613Scucciaqall: ${Append} 13327613Scuccia make NROFF=${NROFF} O=${O} `${Append} .q ${RootGenSrc}` index.t 13427613Scuccia 13527613Scucciaspall: ${Append} 13627613Scuccia make TROFF=${TROFF} O=${O} `${Append} .q ${RootGenSrc}` index.t 13727613Scuccia 13827613Scuccia# only a few files describe functions which are indexed. 13927613Scuccia 14027613Scuccia.t.v: 14128150Sbloom lpr ${PRINTER} -n $*.t 14227613Scuccia 14327613Scuccia.n.t: 144*28152Sbloom ${TBL} ${PRINTER} ${MacroSrc} $*.n | \ 14528150Sbloom ${TROFF} -me ${O} ${PRINTER} -t 1> $*.t 2> $*.x 14627613Scuccia 14727613Scuccia.n.p: 148*28152Sbloom ${TBL} ${PRINTER} ${MacroSrc} $*.n | ${TROFF} -me ${O} ${PRINTER} 2> $*.x 14927613Scuccia 15027613Scuccia.n.x: 151*28152Sbloom ${TBL} ${PRINTER} ${MacroSrc} $*.n | ${TROFF} -me ${O} ${PRINTER} -z 2> $*.x 15227613Scuccia 15327613Scuccia.n.r: 154*28152Sbloom tbl ${MacroSrc} $*.n | ${NROFF} -rb3 -me ${O} 1> $*.r 2> $*.rx 15527613Scuccia rm -f helpindex 15627613Scuccia 15727613Scuccia.n.rx: 158*28152Sbloom tbl ${MacroSrc} $*.n | ${NROFF} -rb3 -me ${O} 1> $*.r 2> $*.rx 15927613Scuccia rm -f helpindex 16027613Scuccia 16127613Scuccia.n.q: 162*28152Sbloom tbl ${MacroSrc} $*.n | ${NROFF} -me -T37 ${O} 2> $*.qx | col > $*.q 16327613Scuccia 16427613Scuccia.n.sp: 16527613Scuccia spell $*.n > $*.sp 16627613Scuccia 16727613Scucciainstall: 16827613Scuccia make O=${O} rall 16927613Scuccia cp `${Append} .r ${RootGenSrc}` helpindex ${LibDir}/manual 17027613Scuccia 17127613Scucciaclean: 17228150Sbloom -rm -f paper.-[PT]* app.-[PT]* errs Errs make.out 17327613Scuccia -rm -f *.r 17427613Scuccia -rm -f *.rx 17527613Scuccia -rm -f helpindex 17628150Sbloom -rm -f tindex 17727613Scuccia -rm -f *.t 17827613Scuccia -rm -f *.q 17927613Scuccia -rm -f *.x 18027613Scuccia 18127613Scuccia 18227613Scucciafindex: ${Append} 18327613Scuccia make `${Append} .x ${RootGenSrc}` 18427613Scuccia echo ".Ib" > index 18527613Scuccia sort +3 -o index index `${Append} .x ${RootGenSrc}` 18627613Scuccia sed -f indexsed index > indexx 187*28152Sbloom ${Rmt} ${TROFF} -me ${MacroSrc} indexx 18827613Scuccia 18927613Scucciaindex.t: 19027613Scuccia make `${Append} .x ${RootGenSrc}` 19127613Scuccia echo ".Ib" > index 19227613Scuccia sort +3 -o index index `${Append} .x ${RootGenSrc}` 19327613Scuccia sed -f indexsed index > indexx 194*28152Sbloom ${TROFF} -me -x -t ${MacroSrc} indexx > index.t 19527613Scuccia 19627613Scucciapindex: ${Append} 19727613Scuccia make `${Append} .x ${RootGenSrc}` 19827613Scuccia echo ".Ib" > index 19927613Scuccia sort +3 -o index index `${Append} .x ${RootGenSrc}` 20027613Scuccia sed -f indexsed index > indexx 201*28152Sbloom ${TROFF} -me ${MacroSrc} indexx 20227613Scuccia 20327613Scucciahelpindex: ${Append} 20427613Scuccia make `${Append} .rx ${RootGenSrc}` 20527613Scuccia cat `${Append} .rx ${RootGenSrc}` | tr '\227' ' ' > helpindex 20627613Scuccia 20727613Scucciatags: /dev/tty ${Append} 20827613Scuccia awk -f mantags `${Append} .n ${RootGenSrc}` | sort > tags 20927613Scuccia 21027613Scuccia 21127613Scuccia${Append}: 21227613Scuccia (cd ../utils ; make LibDir=${LibDir} ${Append}) 21327613Scuccia 21427613Scuccia# to create a database for lxref to use: 21527613ScucciaC-database: ${CcodeDir}/sysat.c 21627613Scuccia grep "^ MK" ${CcodeDir}/sysat.c > mks 21727613Scuccia sed -f fixmks.sed < mks > mks.fixed 21827613Scuccia (echo "(Chome)" ; cat mks.fixed ) > C-database 21927613Scuccia rm -f mks mks.fixed 22027613Scuccia 22127613Scucciadoc-database: 22227613Scuccia awk -f extrnames.awk `${Append} .n ${RootGenSrc}`\ 22327613Scuccia | sed -f fixmks.sed > doc-database 22427613Scuccia 22527613Scuccia 22627613Scucciabigxref: C-database doc-database 22727613Scuccia ${Append} -p ${LibDir}/ `(cd ${LibDir} ; make echorequired)` | \ 22827613Scuccia sed 's/\.l/.x/g' > lisplibfiles 22927613Scuccia lxref doc-database C-database `cat lisplibfiles` > bigxref 23027613Scuccia 23127613Scuccia# simple table of contents, just a listing of which function is 23227613Scuccia# documented in which chapter 23327613Scucciatofc: 23427613Scuccia egrep "^.Lc|^.Lf|^.Lx|^.sh" `${Append} .n ${RootGenSrc}` > tofc 23527613Scuccia 23627613Scuccia 23727613Scucciacopysource: 238*28152Sbloom (tar cf - ${MacroSrc} ${TMacSrc} `${Append} .n ${RootGenSrc}` \ 239*28152Sbloom ${UtilSrc} | (cd ${CopyTo} ; tar xf -)) 24027613Scuccia 24127613Scucciascriptcatall: ${AllSrc} ${Append} 24227613Scuccia @(cd .. ; scriptcat doc doc ${MacroSrc} `${Append} .n ${RootGenSrc}` ${UtilSrc}) 24327613Scuccia @(cd .. ; scriptcat doc lisplib/manual \ 24427613Scuccia `${Append} .r ${RootGenSrc}` helpindex) 24527613Scuccia 24627613Scucciacopymanual: ${Append} 24727613Scuccia ( cd ${FromDir}/manual ; \ 24827613Scuccia cp `${Append} .r ${RootGenSrc}` helpindex ${CopyTo}) 24927613Scuccia 25027613Scuccia 251