1# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 2# $Id: bsd.port.subdir.mk,v 1.2 1994/08/22 11:20:07 jkh Exp $ 3 4.MAIN: all 5 6STRIP?= -s 7 8BINGRP?= bin 9BINOWN?= bin 10BINMODE?= 555 11 12_SUBDIRUSE: .USE 13 @for entry in ${SUBDIR}; do \ 14 (if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ 15 echo "===> ${DIRPRFX}$${entry}.${MACHINE}"; \ 16 edir=$${entry}.${MACHINE}; \ 17 cd ${.CURDIR}/$${edir}; \ 18 else \ 19 echo "===> ${DIRPRFX}$$entry"; \ 20 edir=$${entry}; \ 21 cd ${.CURDIR}/$${edir}; \ 22 fi; \ 23 ${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \ 24 done 25 26${SUBDIR}:: 27 @if test -d ${.TARGET}.${MACHINE}; then \ 28 cd ${.CURDIR}/${.TARGET}.${MACHINE}; \ 29 else \ 30 cd ${.CURDIR}/${.TARGET}; \ 31 fi; \ 32 ${MAKE} all 33 34.if !target(all) 35all: _SUBDIRUSE 36.endif 37 38.if !target(package) 39package: _SUBDIRUSE 40.endif 41 42.if !target(bundle) 43bundle: _SUBDIRUSE 44.endif 45 46.if !target(extract) 47extract: _SUBDIRUSE 48.endif 49 50.if !target(configure) 51configure: _SUBDIRUSE 52.endif 53 54.if !target(build) 55build: _SUBDIRUSE 56.endif 57 58.if !target(clean) 59clean: _SUBDIRUSE 60.endif 61 62.if !target(depend) 63depend: _SUBDIRUSE 64.endif 65 66.if !target(install) 67.if !target(beforeinstall) 68beforeinstall: 69.endif 70.if !target(afterinstall) 71afterinstall: 72.endif 73install: afterinstall 74afterinstall: realinstall 75realinstall: beforeinstall _SUBDIRUSE 76.endif 77 78.if !target(tags) 79tags: _SUBDIRUSE 80.endif 81