MLINKS: Deduplicate some of the logic, simplify, and unhide install commands.
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
95aca93861
commit
798fceb2c1
@ -171,6 +171,17 @@ ${__target}: ${__page}
|
||||
|
||||
.endif # ${MK_MANCOMPRESS} == "no"
|
||||
|
||||
.if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS)
|
||||
.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/}
|
||||
_MANLINKS+= ${MANDIR}${_osect}${MANSUBDIR}/${_oname} \
|
||||
${MANDIR}${_dsect}${MANSUBDIR}/${_dname}
|
||||
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
|
||||
_MANLINKS+= ${CATDIR}${_osect}${MANSUBDIR}/${_oname} \
|
||||
${CATDIR}${_dsect}${MANSUBDIR}/${_dname}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
maninstall: _maninstall
|
||||
_maninstall:
|
||||
.if defined(MAN) && !empty(MAN)
|
||||
@ -215,25 +226,10 @@ _maninstall: ${MAN}
|
||||
.endfor
|
||||
.endif # ${MK_MANCOMPRESS} == "no"
|
||||
.endif
|
||||
|
||||
.if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS)
|
||||
.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/}
|
||||
@l=${DESTDIR}${MANDIR}${_osect}${MANSUBDIR}/${_oname}; \
|
||||
t=${DESTDIR}${MANDIR}${_dsect}${MANSUBDIR}/${_dname}; \
|
||||
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
|
||||
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
|
||||
${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}
|
||||
.for l t in ${_MANLINKS}
|
||||
rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \
|
||||
${INSTALL_LINK} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
|
||||
.endfor
|
||||
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
|
||||
.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/}
|
||||
@l=${DESTDIR}${CATDIR}${_osect}${MANSUBDIR}/${_oname}; \
|
||||
t=${DESTDIR}${CATDIR}${_dsect}${MANSUBDIR}/${_dname}; \
|
||||
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
|
||||
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
|
||||
${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
|
||||
manlint:
|
||||
.if defined(MAN) && !empty(MAN)
|
||||
|
Loading…
Reference in New Issue
Block a user