bsd.subdir.mk revision 1844
11844Swollman#	from: @(#)bsd.subdir.mk	5.9 (Berkeley) 2/1/91
21844Swollman#	$Id: bsd.subdir.mk,v 1.5 1994/01/31 06:10:40 rgrimes Exp $
31638Srgrimes
41638Srgrimes.MAIN: all
51638Srgrimes
61638SrgrimesSTRIP?=	-s
71638Srgrimes
81638SrgrimesBINGRP?=	bin
91638SrgrimesBINOWN?=	bin
101638SrgrimesBINMODE?=	555
111638Srgrimes
121638Srgrimes_SUBDIRUSE: .USE
131638Srgrimes	@for entry in ${SUBDIR}; do \
141638Srgrimes		(if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
151844Swollman			echo "===> ${DIRPRFX}$${entry}.${MACHINE}"; \
161844Swollman			edir=$${entry}.${MACHINE}; \
171844Swollman			cd ${.CURDIR}/$${edir}; \
181638Srgrimes		else \
191844Swollman			echo "===> ${DIRPRFX}$$entry"; \
201844Swollman			edir=$${entry}; \
211844Swollman			cd ${.CURDIR}/$${edir}; \
221638Srgrimes		fi; \
231844Swollman		${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \
241638Srgrimes	done
251638Srgrimes
261638Srgrimes${SUBDIR}::
271638Srgrimes	@if test -d ${.TARGET}.${MACHINE}; then \
281638Srgrimes		cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
291638Srgrimes	else \
301638Srgrimes		cd ${.CURDIR}/${.TARGET}; \
311638Srgrimes	fi; \
321638Srgrimes	${MAKE} all
331638Srgrimes
341638Srgrimes.if !target(all)
351638Srgrimesall: _SUBDIRUSE
361638Srgrimes.endif
371638Srgrimes
381638Srgrimes.if !target(clean)
391638Srgrimesclean: _SUBDIRUSE
401638Srgrimes.endif
411638Srgrimes
421638Srgrimes.if !target(cleandir)
431638Srgrimescleandir: _SUBDIRUSE
441638Srgrimes.endif
451638Srgrimes
461638Srgrimes.if !target(depend)
471638Srgrimesdepend: _SUBDIRUSE
481638Srgrimes.endif
491638Srgrimes
501844Swollman.if !target (maninstall)
511844Swollmanmaninstall: _SUBDIRUSE
521638Srgrimes.endif
531638Srgrimes
541638Srgrimes.if !target(install)
551638Srgrimes.if !target(beforeinstall)
561638Srgrimesbeforeinstall:
571638Srgrimes.endif
581638Srgrimes.if !target(afterinstall)
591638Srgrimesafterinstall:
601638Srgrimes.endif
611638Srgrimesinstall: afterinstall
621638Srgrimesafterinstall: realinstall
631638Srgrimesrealinstall: beforeinstall _SUBDIRUSE
641638Srgrimes.endif
651638Srgrimes
661638Srgrimes.if !target(lint)
671638Srgrimeslint: _SUBDIRUSE
681638Srgrimes.endif
691638Srgrimes
701638Srgrimes.if !target(obj)
711638Srgrimesobj: _SUBDIRUSE
721638Srgrimes.endif
731638Srgrimes
741638Srgrimes.if !target(tags)
751638Srgrimestags: _SUBDIRUSE
761638Srgrimes.endif
77