Workaround to (hopefully) fix the NOMANCOMPRESS case of the MANFILTER-using

man pages (eg: named/bind/etc).  In order to get (say) dig.1 to pass
through the filter and produce a new dig.1 for installing, I used an
intermediate file at build time, similar to the way the .gz man pages are
built.

I've not extensively tested this, but it seems to work for the known
cases where it was failing, and it only affects the NOMANCOMPRESS case
which was already broken.

Pointed out by: "Ph. Charnier" <charnier@xp11.frmug.org>, PR#1612
This commit is contained in:
Peter Wemm 1996-09-16 14:13:40 +00:00
parent 7ccde0654a
commit eb0085f483

View File

@ -1,4 +1,4 @@
# $Id: bsd.man.mk,v 1.14 1996/08/11 12:31:57 peter Exp $
# $Id: bsd.man.mk,v 1.15 1996/08/26 10:55:32 peter Exp $
#
# The include file <bsd.man.mk> handles installing manual pages and
# their links. <bsd.man.mk> includes the file named "../Makefile.inc"
@ -73,14 +73,23 @@ all-man: ${MANDEPEND}
.if defined(NOMANCOMPRESS)
COPY= -c
# Make special arrangements to filter to a temporary file at build time
# for NOMANCOMPRESS.
.if defined(MANFILTER)
FILTEXTENSION= .filt
.else
FILTEXTENSION=
.endif
ZEXT=
.if defined(MANFILTER)
.for sect in ${SECTIONS}
.if defined(MAN${sect}) && !empty(MAN${sect})
CLEANFILES+= ${MAN${sect}}
CLEANFILES+= ${MAN${sect}:T:S/$/${FILTEXTENSION}/g}
.for page in ${MAN${sect}}
.for target in ${page}
.for target in ${page:T:S/$/${FILTEXTENSION}/g}
all-man: ${target}
${target}: ${page}
${MANFILTER} < ${.ALLSRC} > ${.TARGET}
@ -118,7 +127,13 @@ maninstall::
.if defined(MAN${sect}) && !empty(MAN${sect})
maninstall:: ${MAN${sect}}
.if defined(NOMANCOMPRESS)
.if defined(MANFILTER)
.for page in ${MAN${sect}}
${MINSTALL} ${page:T:S/$/${FILTEXTENSION}/g} ${DESTDIR}${MANDIR}${sect}${MANSUBDIR}/${page}
.endfor
.else
${MINSTALL} ${.ALLSRC} ${DESTDIR}${MANDIR}${sect}${MANSUBDIR}
.endif
.else
${MINSTALL} ${.ALLSRC:T:S/$/${ZEXTENSION}/g} \
${DESTDIR}${MANDIR}${sect}${MANSUBDIR}