summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorGavin Maltby <Gavin.Maltby@Sun.COM>2009-06-30 06:44:42 +1000
committerGavin Maltby <Gavin.Maltby@Sun.COM>2009-06-30 06:44:42 +1000
commit0756aa0bcac8d365602b6dbaa3bed130eb279e43 (patch)
treec40587480cb3ad904b437c5c2b213d00affc2b2a /usr/src
parent3d995820f4ce8cd712d97f05aae6d30d9952d298 (diff)
downloadillumos-gate-0756aa0bcac8d365602b6dbaa3bed130eb279e43.tar.gz
6853828 bldenv to use /etc/nightly.conf, set DMAKE_MODE, and start a new task honoring BUILD_PROJECT
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/tools/scripts/bldenv.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv.sh
index b9d09ec01d..c0ab625f6d 100644
--- a/usr/src/tools/scripts/bldenv.sh
+++ b/usr/src/tools/scripts/bldenv.sh
@@ -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 @@ unset \
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 @@ if "${flags.t}" ; then
export PATH
fi
+export DMAKE_MODE=${DMAKE_MODE:-parallel}
if "${flags.o}" ; then
export CH=
@@ -444,6 +449,10 @@ elif "${flags.t}" ; then
"${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