Mon Dec 14 06:35:02 2009 UTC ()
pullup from -current:
>revision 1.612
>date: 2009/12/13 09:10:16;  author: mrg;  state: Exp;  lines: +4 -3
>enable MAKEDIRTARGET to be called with a separate environment,
>called $MAKEDIRTARGETENV, defaulting to nothing.
>----------------------------
>revision 1.611
>date: 2009/12/13 09:01:46;  author: mrg;  state: Exp;  lines: +6 -1
>if BSD_MK_COMPAT_FILE is defined, .include it.


(mrg)
diff -r1.542.2.9.4.3 -r1.542.2.9.4.4 src/share/mk/bsd.own.mk

cvs diff -r1.542.2.9.4.3 -r1.542.2.9.4.4 src/share/mk/bsd.own.mk (expand / switch to context diff)
--- src/share/mk/bsd.own.mk 2009/09/13 22:24:40 1.542.2.9.4.3
+++ src/share/mk/bsd.own.mk 2009/12/14 06:35:01 1.542.2.9.4.4
@@ -1,5 +1,10 @@
-#	$NetBSD: bsd.own.mk,v 1.542.2.9.4.3 2009/09/13 22:24:40 matt Exp $
+#	$NetBSD: bsd.own.mk,v 1.542.2.9.4.4 2009/12/14 06:35:01 mrg Exp $
 
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include <${BSD_MK_COMPAT_FILE}>
+.endif
+
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
 
@@ -892,8 +897,9 @@
 
 #
 # MAKEDIRTARGET dir target [extra make(1) params]
-#	run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
+#	run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message
 #
+MAKEDIRTARGETENV?=
 MAKEDIRTARGET=\
 	@_makedirtarget() { \
 		dir="$$1"; shift; \
@@ -909,7 +915,7 @@
 		show=$${this:-.}; \
 		echo "$${target} ===> $${show%/}$${1:+	(with: $$@)}"; \
 		cd "$${real}" \
-		&& ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
+		&& ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
 	}; \
 	_makedirtarget