changeset 9990:889ca9ca793d

6853828 bldenv to use /etc/nightly.conf, set DMAKE_MODE, and start a new task honoring BUILD_PROJECT
author Gavin Maltby <Gavin.Maltby@Sun.COM>
date Tue, 30 Jun 2009 06:44:42 +1000
parents 33d24b36e077
children 5944be7176ec
files usr/src/tools/scripts/bldenv.sh
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/scripts/bldenv.sh	Mon Jun 29 11:35:21 2009 -0700
+++ b/usr/src/tools/scripts/bldenv.sh	Tue Jun 30 06:44:42 2009 +1000
@@ -21,11 +21,9 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 # Uses supplied "env" file, based on /opt/onbld/etc/env, to set shell variables
 # before spawning a shell for doing a release-style builds interactively
 # and incrementally.
@@ -232,7 +230,13 @@
 	ARCH \
 	CLASSPATH
 
-# setup environmental variables
+#
+# Setup environment variables
+#
+if [[ -f /etc/nightly.conf ]]; then
+	source /etc/nightly.conf
+fi
+
 if [[ -f "$1" ]]; then
 	if [[ "$1" == */* ]]; then
 		source "$1"
@@ -369,6 +373,7 @@
 	export PATH
 fi
 
+export DMAKE_MODE=${DMAKE_MODE:-parallel}
 
 if "${flags.o}" ; then
 	export CH=
@@ -444,6 +449,10 @@
 	    "${TOOLS}"
 fi
 
+#
+# place ourselves in a new task, respecting BUILD_PROJECT if set.
+#
+/usr/bin/newtask -c $$ ${BUILD_PROJECT:+-p$BUILD_PROJECT}
 
 if [[ "${flags.c}" == "false" && -x "$SHELL" && \
     "$(basename "${SHELL}")" != "csh" ]]; then