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:
parent
06e9f945df
commit
7daf790957
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20320
@ -6,7 +6,7 @@
|
||||
# bsd.port.mk - 940820 Jordan K. Hubbard.
|
||||
# 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!
|
||||
|
||||
@ -541,20 +541,32 @@ HAS_CONFIGURE= yes
|
||||
|
||||
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
|
||||
.if defined(MAN${sect})
|
||||
_MANPAGES+= ${MAN${sect}:S.^.man/${MANLANG}/man${sect}/.}
|
||||
_MANPAGES+= ${MAN${sect}:S.^.${MAN${sect}PREFIX}/man/${lang}/man${sect}/.}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.if defined(MANL)
|
||||
_MANPAGES+= ${MANL:S.^.man/${MANLANG}/manl/.}
|
||||
_MANPAGES+= ${MANL:S.^.${MANLPREFIX}/man/${lang}/manl/.}
|
||||
.endif
|
||||
|
||||
.if defined(MANN)
|
||||
_MANPAGES+= ${MANN:S.^.man/${MANLANG}/mann/.}
|
||||
_MANPAGES+= ${MANN:S.^.${MANNPREFIX}/man/${lang}/mann/.}
|
||||
.endif
|
||||
|
||||
.endfor
|
||||
|
||||
.if defined(_MANPAGES) && defined(MANCOMPRESSED)
|
||||
_MANPAGES:= ${_MANPAGES:S/$/.gz/}
|
||||
.endif
|
||||
@ -981,12 +993,12 @@ _PORT_USE: .USE
|
||||
.if defined(MANCOMPRESSED) && defined(NOMANCOMPRESS)
|
||||
@${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}"
|
||||
.for manpage in ${_MANPAGES}
|
||||
@${GUNZIP_CMD} ${MANPREFIX}/${manpage}
|
||||
@${GUNZIP_CMD} ${manpage}
|
||||
.endfor
|
||||
.elif !defined(MANCOMPRESSED) && !defined(NOMANCOMPRESS)
|
||||
@${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}"
|
||||
.for manpage in ${_MANPAGES}
|
||||
@${GZIP_CMD} ${MANPREFIX}/${manpage}
|
||||
@${GZIP_CMD} ${manpage}
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user