Add dependent option STAGING_MAN/STAGING

Use a single mlinks set, since some libs (eg. libc) do cross section
links.
This commit is contained in:
Simon J. Gerraty 2015-06-04 19:11:56 +00:00
parent 8bf4a1b89c
commit 1e34437637
2 changed files with 5 additions and 4 deletions

View File

@ -127,7 +127,7 @@ _manpages: ${MAN}
ZEXT= ${MCOMPRESS_EXT}
.if defined(MAN) && !empty(MAN)
.if ${MK_STAGING}
.if ${MK_STAGING_MAN} == "yes"
staging: stage_files
_mansets:= ${MAN:E:O:u:@s@man$s@}
STAGE_SETS+= ${_mansets}
@ -136,10 +136,10 @@ stage_files.man${_page:T:E}: ${_page}
STAGE_DIR.man${_page:T:E}?= ${STAGE_OBJTOP}${MANDIR}${_page:T:E}${MANSUBDIR}
.endfor
.if !empty(MLINKS)
STAGE_SETS+= mlinks
staging: stage_links
.for __section in ${MLINKS:E:O:u}
STAGE_LINKS.man${__section}:= ${MLINKS:M*.${__section}:S,^,${MANDIR}${__section}${MANSUBDIR}/,}
.endfor
STAGE_LINKS.mlinks:= ${MLINKS:@f@${f:S,^,${MANDIR}${f:E}${MANSUBDIR}/,}@}
stage_links.mlinks: ${_mansets:@s@stage_files.$s@}
.endif
.endif

View File

@ -72,6 +72,7 @@ __DEFAULT_NO_OPTIONS = \
# meta mode related
__DEFAULT_DEPENDENT_OPTIONS = \
STAGING_MAN/STAGING \
STAGING_PROG/STAGING
.include <bsd.mkopt.mk>