[BACK]Return to bsd.subdir.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

File: [cvs.NetBSD.org] / src / share / mk / bsd.subdir.mk (download)

Revision 1.49, Sat Oct 25 14:58:00 2008 UTC (11 years, 11 months ago) by apb
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.48: +5 -1 lines

Add a NOSUBDIR variable for bsd.subdir.mk.  If NOSUBDIR is defined
then SUBDIR is ignored.

#	$NetBSD: bsd.subdir.mk,v 1.49 2008/10/25 14:58:00 apb Exp $
#	@(#)bsd.subdir.mk	8.1 (Berkeley) 6/8/93

.include <bsd.init.mk>

.if !defined(NOSUBDIR)					# {

.for dir in ${SUBDIR}
.if exists(${dir}.${MACHINE})

__recurse: .USE
	@${MAKEDIRTARGET} ${.TARGET:C/^[^-]*-//} ${.TARGET:C/-.*$//}

.if make(cleandir)

# for obscure reasons, we can't do a simple .if ${dir} == ".WAIT"
# but have to assign to __TARGDIR first.
.for targ in ${__RECURSETARG}
.for dir in ${__REALSUBDIR}
__TARGDIR := ${dir}
.if ${__TARGDIR} == ".WAIT"
SUBDIR_${targ} += .WAIT
.elif !commands(${targ}-${dir})
${targ}-${dir}: .PHONY .MAKE __recurse
SUBDIR_${targ} += ${targ}-${dir}
.if defined(__REALSUBDIR)
subdir-${targ}: .PHONY ${SUBDIR_${targ}}
${targ}: subdir-${targ}

.endif	# ! NOSUBDIR					# }

${TARGETS}:	# ensure existence