1 # $NetBSD: bsd.subdir.mk,v 1.50 2009/11/29 16:00:00 uebayasi Exp $
2 # @(#)bsd.subdir.mk 8.1 (Berkeley) 6/8/93
6 # MINIX: cleandepend works for SUBDIRs
11 .if
!defined
(NOSUBDIR
) # {
14 .if exists
(${dir}.
${MACHINE})
15 __REALSUBDIR
+=${dir}.
${MACHINE}
22 @
${MAKEDIRTARGET} ${.TARGET
:C
/^
[^
-]*-//} ${.TARGET
:C
/-.
*$//}
25 __RECURSETARG
= ${TARGETS
:Nclean
}
28 __RECURSETARG
= ${TARGETS}
31 # for obscure reasons, we can't do a simple .if ${dir} == ".WAIT"
32 # but have to assign to __TARGDIR first.
33 .for targ in
${__RECURSETARG}
34 .for
dir in
${__REALSUBDIR}
36 .if
${__TARGDIR} == ".WAIT"
37 SUBDIR_
${targ} += .WAIT
38 .elif
!commands
(${targ}-${dir})
39 ${targ}-${dir}: .PHONY .MAKE __recurse
40 SUBDIR_
${targ} += ${targ}-${dir}
43 subdir-
${targ}: .PHONY
${SUBDIR_
${targ}}
44 ${targ}: subdir-
${targ}
47 .
endif # ! NOSUBDIR # }
49 ${TARGETS}: # ensure existence