1994-08-04 21:09:27 +00:00
|
|
|
# from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91
|
1997-03-02 00:16:49 +00:00
|
|
|
# $Id: bsd.doc.mk,v 1.32 1997/02/22 13:56:09 peter Exp $
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1996-12-19 22:40:43 +00:00
|
|
|
PRINTERDEVICE?= ascii
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
BIB?= bib
|
1996-12-19 22:40:43 +00:00
|
|
|
EQN?= eqn -T${PRINTERDEVICE}
|
1994-05-30 19:09:18 +00:00
|
|
|
GREMLIN?= grn
|
|
|
|
GRIND?= vgrind -f
|
|
|
|
INDXBIB?= indxbib
|
|
|
|
PIC?= pic
|
|
|
|
REFER?= refer
|
1996-12-19 22:40:43 +00:00
|
|
|
.if ${PRINTERDEVICE} == "ascii"
|
1995-01-17 22:04:38 +00:00
|
|
|
ROFF?= groff -mtty-char ${TRFLAGS} ${MACROS} -o${PAGES}
|
1995-01-17 21:27:30 +00:00
|
|
|
.else
|
1995-01-11 00:00:11 +00:00
|
|
|
ROFF?= groff ${TRFLAGS} ${MACROS} -o${PAGES}
|
1995-01-17 21:27:30 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
SOELIM?= soelim
|
1995-11-29 16:05:08 +00:00
|
|
|
SOELIMPP= sed ${SOELIMPPARGS}
|
|
|
|
SOELIMPPARGS0= ${SRCS} ${EXTRA}
|
|
|
|
SOELIMPPARGS1= ${SOELIMPPARGS0:S/^/-e\\ \'s:\(\.so[\\ \\ ][\\ \\ ]*\)\(/}
|
|
|
|
SOELIMPPARGS2= ${SOELIMPPARGS1:S/$/\)\$:\1${SRCDIR}\/\2:\'/}
|
|
|
|
SOELIMPPARGS= ${SOELIMPPARGS2:S/\\'/'/g}
|
1994-05-30 19:09:18 +00:00
|
|
|
TBL?= tbl
|
|
|
|
|
1995-01-11 00:00:11 +00:00
|
|
|
DOC?= paper
|
|
|
|
|
1996-12-19 22:40:43 +00:00
|
|
|
TRFLAGS+= -T${PRINTERDEVICE}
|
1995-01-11 00:00:11 +00:00
|
|
|
.if defined(USE_EQN)
|
|
|
|
TRFLAGS+= -e
|
|
|
|
.endif
|
|
|
|
.if defined(USE_TBL)
|
|
|
|
TRFLAGS+= -t
|
|
|
|
.endif
|
|
|
|
.if defined(USE_PIC)
|
|
|
|
TRFLAGS+= -p
|
|
|
|
.endif
|
|
|
|
.if defined(USE_SOELIM)
|
|
|
|
TRFLAGS+= -s
|
|
|
|
.endif
|
|
|
|
.if defined(USE_REFER)
|
|
|
|
TRFALGS+= -R
|
|
|
|
.endif
|
|
|
|
|
1997-02-13 03:26:02 +00:00
|
|
|
.if defined(NODOCCOMPRESS) || ${PRINTERDEVICE} == "html"
|
1996-12-19 22:40:43 +00:00
|
|
|
DFILE= ${DOC}.${PRINTERDEVICE}
|
1995-07-27 15:03:27 +00:00
|
|
|
GZIPCMD= cat
|
1995-07-26 13:51:46 +00:00
|
|
|
.else
|
1996-12-19 22:40:43 +00:00
|
|
|
DFILE= ${DOC}.${PRINTERDEVICE}.gz
|
1995-07-27 15:03:27 +00:00
|
|
|
GZIPCMD= gzip -c
|
1995-07-26 13:51:46 +00:00
|
|
|
.endif
|
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
PAGES?= 1-
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1997-02-13 03:26:02 +00:00
|
|
|
UNROFF?= unroff
|
|
|
|
HTML_SPLIT?= yes
|
1997-02-16 22:23:44 +00:00
|
|
|
UNROFFFLAGS?= -fhtml
|
1997-02-13 03:26:02 +00:00
|
|
|
.if ${HTML_SPLIT} == "yes"
|
|
|
|
UNROFFFLAGS+= split=1
|
|
|
|
.endif
|
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
# Compatibility mode flag for groff. Use this when formatting documents with
|
|
|
|
# Berkeley me macros.
|
|
|
|
COMPAT?= -C
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1995-01-11 00:00:11 +00:00
|
|
|
.PATH: ${.CURDIR} ${SRCDIR}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1995-01-11 02:41:09 +00:00
|
|
|
.MAIN: all
|
1995-07-26 13:51:46 +00:00
|
|
|
all: ${DFILE}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.if !target(print)
|
1995-07-26 13:51:46 +00:00
|
|
|
print: ${DFILE}
|
|
|
|
.if defined(NODOCCOMPRESS)
|
1996-12-22 16:16:13 +00:00
|
|
|
lpr ${DFILE}
|
1995-07-26 13:51:46 +00:00
|
|
|
.else
|
1996-12-22 16:16:13 +00:00
|
|
|
${GZIPCMD} -d ${DFILE} | lpr
|
1995-07-26 13:51:46 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
|
|
|
|
1997-02-13 03:26:02 +00:00
|
|
|
CLEANFILES+= ${DOC}.${PRINTERDEVICE} ${DOC}.${PRINTERDEVICE}.gz \
|
|
|
|
${DOC}.ascii ${DOC}.ascii.gz \
|
|
|
|
${DOC}.ps ${DOC}.ps.gz \
|
|
|
|
${DOC}.html ${DOC}-*.html
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
FILES?= ${SRCS}
|
1995-01-11 02:27:01 +00:00
|
|
|
realinstall:
|
1997-02-13 03:26:02 +00:00
|
|
|
.if ${PRINTERDEVICE} == "html"
|
1997-03-02 00:16:49 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
|
|
${.OBJDIR}/${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
|
1997-02-13 03:26:02 +00:00
|
|
|
.else
|
1995-01-04 22:43:52 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
1995-07-26 13:51:46 +00:00
|
|
|
${DFILE} ${DESTDIR}${BINDIR}/${VOLUME}
|
1997-02-13 03:26:02 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1995-01-11 02:27:01 +00:00
|
|
|
install: beforeinstall realinstall afterinstall
|
|
|
|
|
|
|
|
.if !target(beforeinstall)
|
|
|
|
beforeinstall:
|
|
|
|
|
|
|
|
.endif
|
|
|
|
.if !target(afterinstall)
|
|
|
|
afterinstall:
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
1995-01-14 07:51:10 +00:00
|
|
|
DISTRIBUTION?= doc
|
1994-11-13 21:05:28 +00:00
|
|
|
.if !target(distribute)
|
|
|
|
distribute:
|
1995-02-25 20:51:14 +00:00
|
|
|
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
|
1994-11-13 21:05:28 +00:00
|
|
|
.endif
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
spell: ${SRCS}
|
1994-08-04 21:09:27 +00:00
|
|
|
(cd ${.CURDIR}; spell ${SRCS} ) | sort | \
|
|
|
|
comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
BINDIR?= /usr/share/doc
|
1995-01-04 22:43:52 +00:00
|
|
|
BINMODE= 444
|
1995-01-11 00:00:11 +00:00
|
|
|
|
|
|
|
SRCDIR?= ${.CURDIR}
|
|
|
|
|
1995-07-26 13:51:46 +00:00
|
|
|
.if !target(${DFILE})
|
1997-02-13 03:26:02 +00:00
|
|
|
.if ${PRINTERDEVICE} == "html"
|
|
|
|
${DFILE}: ${SRCS} ${EXTRA} ${OBJS}
|
1997-02-16 22:23:44 +00:00
|
|
|
cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \
|
1997-03-02 00:16:49 +00:00
|
|
|
document=${.OBJDIR}/${DOC} ${SRCS}
|
1997-02-13 03:26:02 +00:00
|
|
|
.else
|
|
|
|
|
1995-11-29 16:05:08 +00:00
|
|
|
${DFILE}:: ${SRCS} ${EXTRA} ${OBJS}
|
|
|
|
# XXX ${.ALLSRC} doesn't work unless there are a lot of .PATH.foo statements.
|
|
|
|
ALLSRCS= ${SRCS:S;^;${SRCDIR}/;}
|
|
|
|
${DFILE}:: ${SRCS}
|
|
|
|
.if defined(USE_SOELIMPP)
|
|
|
|
${SOELIMPP} ${ALLSRCS} | ${ROFF} | ${GZIPCMD} > ${.TARGET}
|
|
|
|
.else
|
1995-07-27 15:03:27 +00:00
|
|
|
(cd ${SRCDIR}; ${ROFF} ${.ALLSRC}) | ${GZIPCMD} > ${.TARGET}
|
1995-11-29 16:05:08 +00:00
|
|
|
.endif
|
1995-07-26 13:51:46 +00:00
|
|
|
.else
|
|
|
|
.if !defined(NODOCCOMPRESS)
|
1996-12-19 22:40:43 +00:00
|
|
|
${DFILE}: ${DOC}.${PRINTERDEVICE}
|
|
|
|
${GZIPCMD} ${DOC}.${PRINTERDEVICE} > ${.TARGET}
|
1995-07-26 13:51:46 +00:00
|
|
|
.endif
|
1995-01-11 00:00:11 +00:00
|
|
|
.endif
|
1997-02-13 03:26:02 +00:00
|
|
|
.endif
|
1995-01-11 00:00:11 +00:00
|
|
|
|
|
|
|
.if !target(depend)
|
|
|
|
depend:
|
|
|
|
.endif
|
1995-01-11 02:06:58 +00:00
|
|
|
|
1995-03-10 08:54:42 +00:00
|
|
|
.if !target(maninstall)
|
|
|
|
maninstall:
|
|
|
|
.endif
|
1996-06-24 04:26:21 +00:00
|
|
|
|
|
|
|
.include <bsd.dep.mk>
|
|
|
|
.include <bsd.obj.mk>
|