# Copyright (c) 1986 Regents of the University of California.
# All rights reserved. The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
# @(#)Makefile 6.4 (Berkeley) 6/8/88
# $Header: Makefile 1.4 83/07/21 21:27:16 sklower Exp $
# makefile for the franz lisp manual
# sources: ${MacroSrc}: macros for the franz documents
# ${TMacSrc}: macros for typesetting franz documents
# ch1.n intro and description of types
# ch2.n data structure access
# ch3.n on arithmetic functions.
# ch4.n special functions.
# ch8.n functions and macros
# ch10.n exception handling
.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.
# .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
# .q nroff output file compatible with model 37
# .qx index file for .q files.
# make install will install the nroff versions of the manual in the
# directory (LibDir/manual) where the auxfns0.l help command can find them.
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
# 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
RootGenSrc
= ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch61 ch7 ch8 \
ch9 ch10 ch11 ch12 ch13 ch14 ch15 ch16 ch17 chb chc
DocSrc
= ch0.n ch1.n ch2.n ch3.n ch4.n ch5.n ch6.n ch7.n ch8.n \
ch9.n ch10.n ch11.n ch12.n ch13.n ch14.n ch15.n ch16.n ch17.n
UtilSrc
= Makefile indexsed mantags extrnames.awk fixmks.sed \
#-- can't get a expression for all source at make read time. must use
# append to add .n to RootGenSrc
lpr
${PRINTER} -n paper.
${PRINTER}
paper.
${PRINTER}: ${DocSrc} ${TMacSrc}
${TBL} ${PRINTER} ${TMacSrc} ${DocSrc} | \
${TROFF} -t
-me
1> paper.
${PRINTER} 2> tindex
lpr
${PRINTER} -n app.
${PRINTER}
app.
${PRINTER}: tindex
${TMacSrc} ${DocApp}
echo
".Ib" |
sort +2 tindex
- | sed
-f indexsed | \
${TROFF} -t
-me
${TMacSrc} - ${DocApp} > app.
${PRINTER}
make NROFF
=${NROFF} O
=${O} `${Append} .r ${RootGenSrc}` helpindex
make TROFF
=${TROFF} O
=${O} `${Append} .v ${RootGenSrc}` index.v
make TROFF
=${TROFF} O
=${O} `${Append} .t ${RootGenSrc}` index.t
make TROFF
="troff -s12" tall
make TROFF
=${TROFF} O
=${O} `${Append} .p ${RootGenSrc}` pindex
make NROFF
=${NROFF} O
=${O} `${Append} .q ${RootGenSrc}` index.t
make TROFF
=${TROFF} O
=${O} `${Append} .q ${RootGenSrc}` index.t
# only a few files describe functions which are indexed.
${TBL} ${PRINTER} ${MacroSrc} $*.n | \
${TROFF} -me
${O} ${PRINTER} -t
1> $*.t
2> $*.x
${TBL} ${PRINTER} ${MacroSrc} $*.n |
${TROFF} -me
${O} ${PRINTER} 2> $*.x
${TBL} ${PRINTER} ${MacroSrc} $*.n |
${TROFF} -me
${O} ${PRINTER} -z
2> $*.x
tbl
${MacroSrc} $*.n |
${NROFF} -rb3
-me
${O} 1> $*.r
2> $*.rx
tbl
${MacroSrc} $*.n |
${NROFF} -rb3
-me
${O} 1> $*.r
2> $*.rx
tbl
${MacroSrc} $*.n |
${NROFF} -me
-T37
${O} 2> $*.qx | col
> $*.q
cp
`${Append} .r ${RootGenSrc}` helpindex
${LibDir}/manual
-rm -f paper.
-[PT
]* app.
-[PT
]* errs Errs make.out
make
`${Append} .x ${RootGenSrc}`
sort +3 -o index index
`${Append} .x ${RootGenSrc}`
sed
-f indexsed index
> indexx
${Rmt} ${TROFF} -me
${MacroSrc} indexx
make
`${Append} .x ${RootGenSrc}`
sort +3 -o index index
`${Append} .x ${RootGenSrc}`
sed
-f indexsed index
> indexx
${TROFF} -me
-x
-t
${MacroSrc} indexx
> index.t
make
`${Append} .x ${RootGenSrc}`
sort +3 -o index index
`${Append} .x ${RootGenSrc}`
sed
-f indexsed index
> indexx
${TROFF} -me
${MacroSrc} indexx
make
`${Append} .rx ${RootGenSrc}`
cat
`${Append} .rx ${RootGenSrc}` | tr
'\227' ' ' > helpindex
awk
-f mantags
`${Append} .n ${RootGenSrc}` |
sort > tags
(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
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
egrep
"^.Lc|^.Lf|^.Lx|^.sh" `${Append} .n ${RootGenSrc}` > tofc
(tar cf
- ${MacroSrc} ${TMacSrc} `${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
)
( cd
${FromDir}/manual
; \
cp
`${Append} .r ${RootGenSrc}` helpindex
${CopyTo})