bsd.port.subdir.mk revision 14782
1# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 2# $Id: bsd.port.subdir.mk,v 1.11 1995/03/21 03:59:13 jkh Exp $ 3 4.MAIN: all 5 6.if !defined(DEBUG_FLAGS) 7STRIP?= -s 8.endif 9 10 11ECHO_MSG?= echo 12 13_SUBDIRUSE: .USE 14 @for entry in ${SUBDIR}; do \ 15 OK=""; \ 16 for dud in $$DUDS; do \ 17 if [ $${dud} = $${entry} ]; then \ 18 OK="false"; \ 19 ${ECHO_MSG} "===> ${DIRPRFX}$${entry} skipped"; \ 20 fi; \ 21 done; \ 22 if [ "$$OK" = "" ]; then \ 23 if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ 24 ${ECHO_MSG} "===> ${DIRPRFX}$${entry}.${MACHINE}"; \ 25 edir=$${entry}.${MACHINE}; \ 26 cd ${.CURDIR}/$${edir}; \ 27 else \ 28 ${ECHO_MSG} "===> ${DIRPRFX}$$entry"; \ 29 edir=$${entry}; \ 30 cd ${.CURDIR}/$${edir}; \ 31 fi; \ 32 ${MAKE} ${.TARGET:realinstall=install} \ 33 DIRPRFX=${DIRPRFX}$$edir/; \ 34 fi; \ 35 done 36 37${SUBDIR}:: 38 @if test -d ${.TARGET}.${MACHINE}; then \ 39 cd ${.CURDIR}/${.TARGET}.${MACHINE}; \ 40 else \ 41 cd ${.CURDIR}/${.TARGET}; \ 42 fi; \ 43 ${MAKE} all 44 45.if !target(all) 46all: _SUBDIRUSE 47.endif 48 49.if !target(fetch) 50fetch: _SUBDIRUSE 51.endif 52 53.if !target(fetch-list) 54fetch-list: _SUBDIRUSE 55.endif 56 57.if !target(package) 58package: _SUBDIRUSE 59.endif 60 61.if !target(extract) 62extract: _SUBDIRUSE 63.endif 64 65.if !target(configure) 66configure: _SUBDIRUSE 67.endif 68 69.if !target(build) 70build: _SUBDIRUSE 71.endif 72 73.if !target(clean) 74clean: _SUBDIRUSE 75.endif 76 77.if !target(depend) 78depend: _SUBDIRUSE 79.endif 80 81.if !target(describe) 82describe: _SUBDIRUSE 83.endif 84 85.if !target(reinstall) 86reinstall: _SUBDIRUSE 87.endif 88 89.if !target(install) 90.if !target(beforeinstall) 91beforeinstall: 92.endif 93.if !target(afterinstall) 94afterinstall: 95.endif 96install: afterinstall 97afterinstall: realinstall 98realinstall: beforeinstall _SUBDIRUSE 99.endif 100 101.if !target(tags) 102tags: _SUBDIRUSE 103.endif 104 105.if !target(checksum) 106checksum: _SUBDIRUSE 107.endif 108