Extend the manpage compression handling a bit.

(1) MANLANG is now a list (defaulting to ""), so if you have English
    and Japanese-EUC versions of the manpages, you can say something
    like `MANLANG= "" ja_JP.EUC' and manpage compression will DTRT.

(2) Add new variables MAN%cPREFIX (where %c=[1-9LN]) which default to
    MANPREFIX (which defaults to PREFIX), to specify per-section
    prefixes.  In particular, this handles the cases in many perl
    ports, which install man1pages into man/man1 and man3pages into
    lib/perl5/man/man3.

Note these modifications won't change the behavior of existing
variables used in previously-approved ways, so any Makefile that
worked before will still continue to work.
This commit is contained in:
Satoshi Asami 1996-12-11 10:17:44 +00:00
parent 46afb636fd
commit 39a45e2db1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4923

View File

@ -6,7 +6,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard. # bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain. # This file is in the public domain.
# #
# $Id: bsd.port.mk,v 1.235 1996/12/09 07:08:16 asami Exp $ # $Id: bsd.port.mk,v 1.236 1996/12/11 04:51:31 asami Exp $
# #
# Please view me with 4 column tabs! # Please view me with 4 column tabs!
@ -541,20 +541,32 @@ HAS_CONFIGURE= yes
MANPREFIX?= ${PREFIX} MANPREFIX?= ${PREFIX}
.for sect in 1 2 3 4 5 6 7 8 9
MAN${sect}PREFIX?= ${MANPREFIX}
.endfor
MANLPREFIX?= ${MANPREFIX}
MANNPREFIX?= ${MANPREFIX}
MANLANG?= "" # english only by default
.for lang in ${MANLANG}
.for sect in 1 2 3 4 5 6 7 8 9 .for sect in 1 2 3 4 5 6 7 8 9
.if defined(MAN${sect}) .if defined(MAN${sect})
_MANPAGES+= ${MAN${sect}:S.^.man/${MANLANG}/man${sect}/.} _MANPAGES+= ${MAN${sect}:S.^.${MAN${sect}PREFIX}/man/${lang}/man${sect}/.}
.endif .endif
.endfor .endfor
.if defined(MANL) .if defined(MANL)
_MANPAGES+= ${MANL:S.^.man/${MANLANG}/manl/.} _MANPAGES+= ${MANL:S.^.${MANLPREFIX}/man/${lang}/manl/.}
.endif .endif
.if defined(MANN) .if defined(MANN)
_MANPAGES+= ${MANN:S.^.man/${MANLANG}/mann/.} _MANPAGES+= ${MANN:S.^.${MANNPREFIX}/man/${lang}/mann/.}
.endif .endif
.endfor
.if defined(_MANPAGES) && defined(MANCOMPRESSED) .if defined(_MANPAGES) && defined(MANCOMPRESSED)
_MANPAGES:= ${_MANPAGES:S/$/.gz/} _MANPAGES:= ${_MANPAGES:S/$/.gz/}
.endif .endif
@ -981,12 +993,12 @@ _PORT_USE: .USE
.if defined(MANCOMPRESSED) && defined(NOMANCOMPRESS) .if defined(MANCOMPRESSED) && defined(NOMANCOMPRESS)
@${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}" @${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}"
.for manpage in ${_MANPAGES} .for manpage in ${_MANPAGES}
@${GUNZIP_CMD} ${MANPREFIX}/${manpage} @${GUNZIP_CMD} ${manpage}
.endfor .endfor
.elif !defined(MANCOMPRESSED) && !defined(NOMANCOMPRESS) .elif !defined(MANCOMPRESSED) && !defined(NOMANCOMPRESS)
@${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}"
.for manpage in ${_MANPAGES} .for manpage in ${_MANPAGES}
@${GZIP_CMD} ${MANPREFIX}/${manpage} @${GZIP_CMD} ${manpage}
.endfor .endfor
.endif .endif
.endif .endif