Compress doc' and info' documents before installing them.

This commit is contained in:
Garrett Wollman 1995-07-26 13:51:46 +00:00
parent b083749ad8
commit 91abfd343c
2 changed files with 44 additions and 18 deletions

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91
# $Id: bsd.doc.mk,v 1.18 1995/02/25 20:51:09 phk Exp $
# $Id: bsd.doc.mk,v 1.19 1995/03/10 08:54:41 rgrimes Exp $
PRINTER?= ps
@ -37,6 +37,14 @@ TRFLAGS+= -s
TRFALGS+= -R
.endif
.if defined(NODOCCOMPRESS)
DFILE= ${DOC}.${PRINTER}
GZIP= cat
.else
DFILE= ${DOC}.${PRINTER}.gz
GZIP= gzip -c
.endif
PAGES?= 1-
# Compatibility mode flag for groff. Use this when formatting documents with
@ -46,11 +54,15 @@ COMPAT?= -C
.PATH: ${.CURDIR} ${SRCDIR}
.MAIN: all
all: ${DOC}.${PRINTER}
all: ${DFILE}
.if !target(print)
print: ${DOC}.${PRINTER}
lpr -P${PRINTER} ${DOC}.${PRINTER}
print: ${DFILE}
.if defined(NODOCCOMPRESS)
lpr -P${PRINTER} ${DFILE}
.else
${GZIP} -d ${DFILE} | lpr -P${PRINTER}
.endif
.endif
.if !target(obj)
@ -71,7 +83,7 @@ obj:
clean:
rm -f ${DOC}.${PRINTER} ${DOC}.ps ${DOC}.ascii \
[eE]rrs mklog ${CLEANFILES}
${DOC}.ps.gz ${DOC}.ascii.gz [eE]rrs mklog ${CLEANFILES}
cleandir: clean
cd ${.CURDIR}; rm -rf obj
@ -87,7 +99,7 @@ realinstall:
true ; \
fi
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DOC}.${PRINTER} ${DESTDIR}${BINDIR}/${VOLUME}
${DFILE} ${DESTDIR}${BINDIR}/${VOLUME}
install: beforeinstall realinstall afterinstall
@ -115,13 +127,14 @@ 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}
.if !target(${DFILE})
${DFILE}: ${SRCS}
(cd ${SRCDIR}; ${ROFF} ${.ALLSRC}) | ${GZIP} > ${.TARGET}
.else
.if !defined(NODOCCOMPRESS)
${DFILE}: ${DOC}.${PRINTER}
${GZIP} ${DOC}.${PRINTER} > ${.TARGET}
.endif
.endif
.if !target(depend)

View File

@ -1,13 +1,13 @@
# $Id: bsd.info.mk,v 1.12 1995/02/25 20:51:11 phk Exp $
# $Id: bsd.info.mk,v 1.13 1995/03/10 08:54:42 rgrimes Exp $
BINMODE= 444
BINDIR?= /usr/share/info
MAKEINFO?= makeinfo
MAKEINFOFLAGS?= # --no-split would simplify some things, e.g., compression
MAKEINFOFLAGS?= --no-split # simplify some things, e.g., compression
.MAIN: all
.SUFFIXES: .info .texi .texinfo
.SUFFIXES: .gz .info .texi .texinfo
.texi.info:
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} ${.IMPSRC} -o ${.TARGET}
.texinfo.info:
@ -15,7 +15,20 @@ MAKEINFOFLAGS?= # --no-split would simplify some things, e.g., compression
.PATH: ${.CURDIR}
all: ${INFO:S/$/.info/g}
.if !defined(NOINFOCOMPRESS)
IFILES= ${INFO:S/$/.info.gz/g}
all: ${IFILES}
.else
IFILES= ${INFO:S/$/.info/g}
all: ${IFILES}
.endif
GZIP?= gzip
.for x in ${INFO:S/$/.info/g}
${x:S/$/.gz/}: ${x}
${GZIP} -c ${.ALLSRC} > ${.TARGET}
.endfor
# The default is "info" and it can never be "bin"
DISTRIBUTION?= info
@ -68,7 +81,7 @@ install:
true ; \
fi
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${INFO:S/$/.info*/g} ${DESTDIR}${BINDIR}
${IFILES} ${DESTDIR}${BINDIR}
.if !target(maninstall)
maninstall: