diff options
author | Peter Wemm <peter@FreeBSD.org> | 1996-08-11 12:31:57 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1996-08-11 12:31:57 +0000 |
commit | d5dcd8e63fbd17b55831cbcf8a1ee366ab242f83 (patch) | |
tree | 6a27168ca28e6e26f8b09392a94d256922341b60 /share/mk/bsd.man.mk | |
parent | 6ba7f9ff84b44d284b76952cbea9d7e22ab070bf (diff) | |
download | src-d5dcd8e63fbd17b55831cbcf8a1ee366ab242f83.tar.gz src-d5dcd8e63fbd17b55831cbcf8a1ee366ab242f83.zip |
Add a hook ``MANFILTER''. This optionally specifies a command to
pipe the man page source through before compressing or installing.
This can be used to do do (eg) sed substitution on man pages from
3rd party packages (in particular, ncurses and bind-4.9.4)
This should not affect anything already in the source tree.
Notes
Notes:
svn path=/head/; revision=17511
Diffstat (limited to 'share/mk/bsd.man.mk')
-rw-r--r-- | share/mk/bsd.man.mk | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 446bce41f4c5..601afed5c7c9 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -1,4 +1,4 @@ -# $Id: bsd.man.mk,v 1.12 1996/05/25 23:09:48 wosch Exp $ +# $Id: bsd.man.mk,v 1.13 1996/06/22 06:01:56 phk Exp $ # # The include file <bsd.man.mk> handles installing manual pages and # their links. <bsd.man.mk> includes the file named "../Makefile.inc" @@ -37,6 +37,8 @@ # NOMANCOMPRESS If you do not want unformatted manual pages to be # compressed when they are installed. [not set] # +# MANFILTER command to pipe the raw man page though before compressing +# or installing. Can be used to do sed substitution. # # +++ targets +++ # @@ -73,6 +75,21 @@ all-man: ${MANDEPEND} COPY= -c ZEXT= +.if defined(MANFILTER) +.for sect in ${SECTIONS} +.if defined(MAN${sect}) && !empty(MAN${sect}) +CLEANFILES+= ${MAN${sect}} +.for page in ${MAN${sect}} +.for target in ${page} +all-man: ${target} +${target}: ${page} + ${MANFILT} < ${.ALLSRC} > ${.TARGET} +.endfor +.endfor +.endif +.endfor +.endif + .else ZEXT= ${ZEXTENSION} @@ -84,7 +101,11 @@ CLEANFILES+= ${MAN${sect}:T:S/$/${ZEXTENSION}/g} .for target in ${page:T:S/$/${ZEXTENSION}/} all-man: ${target} ${target}: ${page} +.if defined(MANFILT) + ${MANFILT} < ${.ALLSRC} | ${MCOMPRESS} > ${.TARGET} +.else ${MCOMPRESS} ${.ALLSRC} > ${.TARGET} +.endif .endfor .endfor .endif |