1# @(#)bsd.man.mk 5.2 (Berkeley) 05/11/90 2 3.if exists(${.CURDIR}/../Makefile.inc) 4.include "${.CURDIR}/../Makefile.inc" 5.endif 6 7MANGRP?= bin 8MANOWN?= bin 9MANMODE?= 444 10 11MANDIR?= /usr/share/man/cat 12 13MINSTALL= install -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} 14 15maninstall: 16.if defined(MAN1) && !empty(MAN1) 17 ${MINSTALL} ${MAN1} ${DESTDIR}${MANDIR}1${MANSUBDIR} 18.endif 19.if defined(MAN2) && !empty(MAN2) 20 ${MINSTALL} ${MAN2} ${DESTDIR}${MANDIR}2${MANSUBDIR} 21.endif 22.if defined(MAN3) && !empty(MAN3) 23 ${MINSTALL} ${MAN3} ${DESTDIR}${MANDIR}3${MANSUBDIR} 24.endif 25.if defined(MAN3F) && !empty(MAN3F) 26 ${MINSTALL} ${MAN3F} ${DESTDIR}${MANDIR}3f${MANSUBDIR} 27.endif 28.if defined(MAN4) && !empty(MAN4) 29 ${MINSTALL} ${MAN4} ${DESTDIR}${MANDIR}4${MANSUBDIR} 30.endif 31.if defined(MAN5) && !empty(MAN5) 32 ${MINSTALL} ${MAN5} ${DESTDIR}${MANDIR}5${MANSUBDIR} 33.endif 34.if defined(MAN6) && !empty(MAN6) 35 ${MINSTALL} ${MAN6} ${DESTDIR}${MANDIR}6${MANSUBDIR} 36.endif 37.if defined(MAN7) && !empty(MAN7) 38 ${MINSTALL} ${MAN7} ${DESTDIR}${MANDIR}7${MANSUBDIR} 39.endif 40.if defined(MAN8) && !empty(MAN8) 41 ${MINSTALL} ${MAN8} ${DESTDIR}${MANDIR}8${MANSUBDIR} 42.endif 43.if defined(MLINKS) && !empty(MLINKS) 44 @set ${MLINKS}; \ 45 while test $$# -ge 2; do \ 46 name=$$1; \ 47 shift; \ 48 dir=${DESTDIR}${MANDIR}`expr $$name : '[^\.]*\.\(.*\)'`; \ 49 l=$${dir}${MANSUBDIR}/`expr $$name : '\([^\.]*\)'`.0; \ 50 name=$$1; \ 51 shift; \ 52 dir=${DESTDIR}${MANDIR}`expr $$name : '[^\.]*\.\(.*\)'`; \ 53 t=$${dir}${MANSUBDIR}/`expr $$name : '\([^\.]*\)'`.0; \ 54 echo $$t -\> $$l; \ 55 rm -f $$t; \ 56 ln $$l $$t; \ 57 done; true 58.endif 59