1 # rules to install manpages 2 # Copyright 2008 Roy Marples <roy (a] marples.name> 3 4 _MANPREFIX_SH= if [ -n "${PREFIX}" ]; then echo "${PREFIX}"; else echo "/usr/share"; fi 5 _MANPREFIX!= ${_MANPREFIX_SH} 6 MANPREFIX?= ${_MANPREFIX}$(shell ${_MANPREFIX_SH}) 7 8 MANDIR?= ${MANPREFIX}/man/man 9 MANMODE?= 0444 10 11 _MAN5_SH= for man in ${MAN}; do case $$man in *.5) echo $$man;; esac; done 12 _MAN5!= ${_MAN5_SH} 13 MAN5= ${_MAN5}$(shell ${_MAN5_SH}) 14 15 _MAN8_SH= for man in ${MAN}; do case $$man in *.8) echo $$man;; esac; done 16 _MAN8!= ${_MAN8_SH} 17 MAN8= ${_MAN8}$(shell ${_MAN8_SH}) 18 19 _man: ${MAN} 20 21 _maninstall: _man 22 ${INSTALL} -d ${DESTDIR}${MANDIR}5 23 ${INSTALL} -m ${MANMODE} ${MAN5} ${DESTDIR}${MANDIR}5 24 ${INSTALL} -d ${DESTDIR}${MANDIR}8 25 ${INSTALL} -m ${MANMODE} ${MAN8} ${DESTDIR}${MANDIR}8 26