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