Module Name:    src
Committed By:   mrg
Date:           Sun Dec 13 09:10:16 UTC 2009

Modified Files:
        src/share/mk: bsd.own.mk

Log Message:
enable MAKEDIRTARGET to be called with a separate environment,
called $MAKEDIRTARGETENV, defaulting to nothing.


To generate a diff of this commit:
cvs rdiff -u -r1.611 -r1.612 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.611 src/share/mk/bsd.own.mk:1.612
--- src/share/mk/bsd.own.mk:1.611	Sun Dec 13 09:01:46 2009
+++ src/share/mk/bsd.own.mk	Sun Dec 13 09:10:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.611 2009/12/13 09:01:46 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.612 2009/12/13 09:10:16 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -966,8 +966,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; \
@@ -983,7 +984,7 @@
 		show=$${this:-.}; \
 		echo "$${target} ===> $${show%/}$${1:+	(with: $$@)}"; \
 		cd "$${real}" \
-		&& ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
+		&& ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
 	}; \
 	_makedirtarget
 

Reply via email to