freebsd-skq/share/mk/bsd.doc.mk

138 lines
2.6 KiB
Makefile
Raw Normal View History

# from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91
# $Id: bsd.doc.mk,v 1.11 1995/01/11 02:41:09 wollman Exp $
PRINTER?= ps
1994-05-30 19:09:18 +00:00
BIB?= bib
EQN?= eqn -T${PRINTER}
1994-05-30 19:09:18 +00:00
GREMLIN?= grn
GRIND?= vgrind -f
INDXBIB?= indxbib
PIC?= pic
REFER?= refer
ROFF?= groff ${TRFLAGS} ${MACROS} -o${PAGES}
1994-05-30 19:09:18 +00:00
SOELIM?= soelim
TBL?= tbl
DOC?= paper
TRFLAGS+= -T${PRINTER}
.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
PAGES?= 1-
1994-05-30 19:09:18 +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
.PATH: ${.CURDIR} ${SRCDIR}
1994-05-30 19:09:18 +00:00
.MAIN: all
all: ${DOC}.${PRINTER}
1994-05-30 19:09:18 +00:00
.if !target(print)
print: ${DOC}.${PRINTER}
lpr -P${PRINTER} ${DOC}.${PRINTER}
1994-05-30 19:09:18 +00:00
.endif
.if !target(obj)
.if defined(NOOBJ)
obj:
.else
1994-05-30 19:09:18 +00:00
obj:
@cd ${.CURDIR}; rm -f obj > /dev/null 2>&1 || true; \
here=`pwd`; subdir=`echo $$here | sed 's,^/usr/src/,,'`; \
if test $$here != $$subdir ; then \
dest=/usr/obj/$$subdir ; \
${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \
if test -d /usr/obj -a ! -d $$dest; then \
mkdir -p $$dest; \
else \
true; \
fi; \
else \
true ; \
dest=$$here/obj ; \
${ECHO} "making $$here/obj" ; \
if test ! -d obj ; then \
mkdir $$here/obj; \
fi ; \
fi;
1994-05-30 19:09:18 +00:00
.endif
.endif
clean:
rm -f ${DOC}.${PRINTER} ${DOC}.ps ${DOC}.ascii \
[eE]rrs mklog ${CLEANFILES}
1994-05-30 19:09:18 +00:00
1995-01-04 21:34:13 +00:00
cleandir: clean
cd ${.CURDIR}; rm -rf obj
1994-05-30 19:09:18 +00:00
FILES?= ${SRCS}
realinstall:
@if [ ! -d "${DESTDIR}${BINDIR}/${VOLUME}" ]; then \
/bin/rm -f ${DESTDIR}${BINDIR}/${VOLUME} ; \
mkdir -p ${DESTDIR}${BINDIR}/${VOLUME} ; \
chown root.wheel ${DESTDIR}${BINDIR}/${VOLUME} ; \
chmod 755 ${DESTDIR}${BINDIR}/${VOLUME} ; \
else \
true ; \
fi
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DOC}.${PRINTER} ${DESTDIR}${BINDIR}/${VOLUME}
1994-05-30 19:09:18 +00:00
install: beforeinstall realinstall afterinstall
.if !target(beforeinstall)
beforeinstall:
.endif
.if !target(afterinstall)
afterinstall:
.endif
DISTRIBUTION?= bindist
.if !target(distribute)
distribute:
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${RELEASEDIR}/${DISTRIBUTION} SHARED=copies
.endif
1994-05-30 19:09:18 +00:00
spell: ${SRCS}
(cd ${.CURDIR}; spell ${SRCS} ) | sort | \
comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell
1994-05-30 19:09:18 +00:00
BINDIR?= /usr/share/doc
BINMODE= 444
SRCDIR?= ${.CURDIR}
.if !target(${DOC}.${PRINTER})
CLEANFILES+= ${DOC}.${PRINTER}+
${DOC}.${PRINTER}: ${SRCS}
(cd ${SRCDIR}; ${ROFF} ${.ALLSRC}) > ${.TARGET}+
rm -f ${.TARGET}
mv ${.TARGET}+ ${.TARGET}
.endif
.if !target(depend)
depend:
.endif
1995-01-11 02:06:58 +00:00