bsd.subdir.mk revision 16672
1# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 2# $Id: bsd.subdir.mk,v 1.9 1996/04/05 22:22:44 wosch Exp $ 3 4.MAIN: all 5 6_SUBDIRUSE: .USE 7 @for entry in ${SUBDIR}; do \ 8 (if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ 9 ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE}"; \ 10 edir=$${entry}.${MACHINE}; \ 11 cd ${.CURDIR}/$${edir}; \ 12 else \ 13 ${ECHODIR} "===> ${DIRPRFX}$$entry"; \ 14 edir=$${entry}; \ 15 cd ${.CURDIR}/$${edir}; \ 16 fi; \ 17 ${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \ 18 done 19 20${SUBDIR}:: 21 @if test -d ${.TARGET}.${MACHINE}; then \ 22 cd ${.CURDIR}/${.TARGET}.${MACHINE}; \ 23 else \ 24 cd ${.CURDIR}/${.TARGET}; \ 25 fi; \ 26 ${MAKE} all 27 28 29.for __target in all clean cleandir cleandepend obj objlink depend maninstall lint tags 30.if !target(__target) 31${__target}: _SUBDIRUSE 32.endif 33.endfor 34 35.if !target(install) 36.if !target(beforeinstall) 37beforeinstall: 38.endif 39.if !target(afterinstall) 40afterinstall: 41.endif 42install: afterinstall 43afterinstall: realinstall 44realinstall: beforeinstall _SUBDIRUSE 45.endif 46 47DISTRIBUTION?= bin 48.if !target(afterdistribute) 49afterdistribute: 50.endif 51.if !target(distribute) 52distribute: _SUBDIRUSE 53 cd ${.CURDIR} ; ${MAKE} afterdistribute DESTDIR=${DISTDIR}/${DISTRIBUTION} 54.endif 55