changeset 17607:97bc0bbc5cde

{nightly,bldenv}: always use the proto tools This commit removes support for the -t nightly flag. Update your environment files accordingly.
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Tue, 02 Aug 2016 09:58:53 -0400
parents 8e37412b857c
children 2d3ae773790c
files usr/src/tools/env/illumos.sh usr/src/tools/env/omnios.sh usr/src/tools/scripts/bldenv.sh usr/src/tools/scripts/nightly.1onbld usr/src/tools/scripts/nightly.sh
diffstat 5 files changed, 37 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/env/illumos.sh	Mon Aug 01 20:09:17 2016 -0400
+++ b/usr/src/tools/env/illumos.sh	Tue Aug 02 09:58:53 2016 -0400
@@ -38,14 +38,13 @@
 #       sends mail on completion (-m and the MAILTO variable)
 #       creates packages for PIT/RE (-p)
 #       checks for changes in ELF runpaths (-r)
-#       build and use this workspace's tools in $SRC/tools (-t)
 #
 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not 
 #   be executed directly.
 # - This script is only interpreted by ksh93 and explicitly allows the
 #   use of ksh93 language extensions.
 #
-export NIGHTLY_OPTIONS='-FnCDAlmprt'
+export NIGHTLY_OPTIONS='-FnCDAlmpr'
 
 # CODEMGR_WS - where is your workspace at
 #export CODEMGR_WS="$HOME/ws/illumos-gate"
--- a/usr/src/tools/env/omnios.sh	Mon Aug 01 20:09:17 2016 -0400
+++ b/usr/src/tools/env/omnios.sh	Tue Aug 02 09:58:53 2016 -0400
@@ -38,14 +38,13 @@
 #       sends mail on completion (-m and the MAILTO variable)
 #       creates packages for PIT/RE (-p)
 #       checks for changes in ELF runpaths (-r)
-#       build and use this workspace's tools in $SRC/tools (-t)
 #
 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not 
 #   be executed directly.
 # - This script is only interpreted by ksh93 and explicitly allows the
 #   use of ksh93 language extensions.
 #
-export NIGHTLY_OPTIONS='-nCAmprt'
+export NIGHTLY_OPTIONS='-nCAmpr'
 
 # CODEMGR_WS - where is your workspace at
 #export CODEMGR_WS="$HOME/ws/illumos-gate"
--- a/usr/src/tools/scripts/bldenv.sh	Mon Aug 01 20:09:17 2016 -0400
+++ b/usr/src/tools/scripts/bldenv.sh	Tue Aug 02 09:58:53 2016 -0400
@@ -70,8 +70,6 @@
 [f?invoke csh with the -f (fast-start) option. This option is valid
     only if $SHELL is unset or if it points to csh.]
 [d?set up environment for doing DEBUG builds (default is non-DEBUG)]
-[t?set up environment to use the tools in usr/src/tools (this is the
-    default, use +t to use the tools from /opt/onbld)]
 
 <env_file> [command]
 
@@ -120,7 +118,6 @@
 	typeset d=false
 	typeset O=false
 	typeset o=false
-	typeset t=true
 	typeset s=(
 		typeset e=false
 		typeset h=false
@@ -142,8 +139,6 @@
 	  +f)	flags.f=false ;;
 	  d)	flags.d=true  SUFFIX=""    ;;
 	  +d)	flags.d=false SUFFIX="-nd" ;;
-	  t)	flags.t=true  ;;
-	  +t)	flags.t=false ;;
 	  \?)	usage ;;
     esac
 done
@@ -227,18 +222,6 @@
 [[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
 [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
 
-# must match the getopts in nightly.sh
-OPTIND=1
-NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
-while getopts '+0ABCDdFfGIilMmNnpRrtUuwW' FLAG $NIGHTLY_OPTIONS
-do
-	case "$FLAG" in
-	  t)	flags.t=true  ;;
-	  +t)	flags.t=false ;;
-	  *)	;;
-	esac
-done
-
 POUND_SIGN="#"
 # have we set RELEASE_DATE in our env file?
 if [ -z "$RELEASE_DATE" ]; then
@@ -284,20 +267,18 @@
 TOOLS="${SRC}/tools"
 TOOLS_PROTO="${TOOLS}/proto/root_${MACH}-nd" ; export TOOLS_PROTO
 
-if "${flags.t}" ; then
-	export ONBLD_TOOLS="${ONBLD_TOOLS:=${TOOLS_PROTO}/opt/onbld}"
+export ONBLD_TOOLS="${ONBLD_TOOLS:=${TOOLS_PROTO}/opt/onbld}"
 
-	export STABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/stabs"
-	export CTFSTABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfstabs"
-	export GENOFFSETS="${TOOLS_PROTO}/opt/onbld/bin/genoffsets"
+export STABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/stabs"
+export CTFSTABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfstabs"
+export GENOFFSETS="${TOOLS_PROTO}/opt/onbld/bin/genoffsets"
 
-	export CTFCONVERT="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfconvert"
-	export CTFMERGE="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfmerge"
+export CTFCONVERT="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfconvert"
+export CTFMERGE="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfmerge"
 
-	PATH="${TOOLS_PROTO}/opt/onbld/bin/${MACH}:${PATH}"
-	PATH="${TOOLS_PROTO}/opt/onbld/bin:${PATH}"
-	export PATH
-fi
+PATH="${TOOLS_PROTO}/opt/onbld/bin/${MACH}:${PATH}"
+PATH="${TOOLS_PROTO}/opt/onbld/bin:${PATH}"
+export PATH
 
 export DMAKE_MODE=${DMAKE_MODE:-parallel}
 
@@ -359,7 +340,7 @@
 	print "to build headers and tools."
 	print ""
 
-elif "${flags.t}" ; then
+else
 	printf \
 	    'The tools can be (re)built with the install target in %s.\n\n' \
 	    "${TOOLS}"
--- a/usr/src/tools/scripts/nightly.1onbld	Mon Aug 01 20:09:17 2016 -0400
+++ b/usr/src/tools/scripts/nightly.1onbld	Tue Aug 02 09:58:53 2016 -0400
@@ -113,7 +113,7 @@
 The environment variable NIGHTLY_OPTIONS controls the actions
 .I nightly
 will take as it proceeds.
-The -i, -n, +t and -V options may also be used from the command
+The -i, -n, and -V options may also be used from the command
 line to control the actions without editing your environment file.
 The -i and -n options complete the build more quickly by bypassing
 some actions. If NIGHTLY_OPTIONS is not set, then "-Bmt" build
@@ -166,11 +166,6 @@
 .B \-m
 Send mail to $MAILTO at end of build
 .TP
-.B \-t
-Build and use the tools in $SRC/tools (default setting).
-.TP
-.B \+t
-Use the build tools in "$ONBLD_TOOLS/bin".
 
 .LP
 .B Code checking options
@@ -280,9 +275,7 @@
 .B TOOLS_ROOT
 .RS 5
 Root of the tools proto area for the build.  The makefiles direct
-installation of tools build products to this area.  Unless \fB+t\fR
-is part of $NIGHTLY_OPTIONS, these tools will be used during the
-build.
+installation of tools build products to this area.
 .LP
 As built by nightly, this will always contain non-DEBUG objects.
 Therefore, this will always have a -nd suffix, regardless of
--- a/usr/src/tools/scripts/nightly.sh	Mon Aug 01 20:09:17 2016 -0400
+++ b/usr/src/tools/scripts/nightly.sh	Tue Aug 02 09:58:53 2016 -0400
@@ -444,8 +444,7 @@
 	oldproto=$2
 	newproto=$3
 
-	wsdiff="wsdiff"
-	[ "$t_FLAG" = y ] && wsdiff="wsdiff -t"
+	wsdiff="wsdiff -t"
 
 	echo "\n==== Getting object changes since last build at `date`" \
 	    "($label) ====\n" | tee -a $LOGFILE >> $mail_msg_file
@@ -480,12 +479,11 @@
 	export OPTHOME
 fi
 
-USAGE='Usage: nightly [-in] [+t] [-V VERS ] <env_file>
+USAGE='Usage: nightly [-in] [-V VERS ] <env_file>
 
 Where:
 	-i	Fast incremental options (no clobber, check)
 	-n      Do not do a bringover
-	+t	Use the build tools in $ONBLD_TOOLS/bin
 	-V VERS set the build version string to VERS
 
 	<env_file>  file in Bourne shell syntax that sets and exports
@@ -513,8 +511,6 @@
 	-n      do not do a bringover
 	-p	create packages
 	-r	check ELF runtime attributes in the proto area
-	-t	build and use the tools in $SRC/tools (default setting)
-	+t	Use the build tools in $ONBLD_TOOLS/bin
 	-u	update proto_list_$MACH and friends in the parent workspace;
 		when used with -f, also build an unrefmaster.out in the parent
 	-w	report on differences between previous and current proto areas
@@ -538,7 +534,6 @@
 n_FLAG=n
 p_FLAG=n
 r_FLAG=n
-t_FLAG=y
 U_FLAG=n
 u_FLAG=n
 V_FLAG=n
@@ -553,15 +548,13 @@
 #
 
 OPTIND=1
-while getopts +intV:W FLAG
+while getopts +inV:W FLAG
 do
 	case $FLAG in
 	  i )	i_FLAG=y; i_CMD_LINE_FLAG=y
 		;;
 	  n )	n_FLAG=y
 		;;
-	 +t )	t_FLAG=n
-		;;
 	  V )	V_FLAG=y
 		V_ARG="$OPTARG"
 		;;
@@ -715,7 +708,7 @@
 #
 NIGHTLY_OPTIONS=-${NIGHTLY_OPTIONS#-}
 OPTIND=1
-while getopts +ABCDdFfGIiMmNnpRrtUuwW FLAG $NIGHTLY_OPTIONS
+while getopts +ABCDdFfGIiMmNnpRrUuwW FLAG $NIGHTLY_OPTIONS
 do
 	case $FLAG in
 	  A )	A_FLAG=y
@@ -753,8 +746,6 @@
 		;;
 	  r )	r_FLAG=y
 		;;
-	 +t )	t_FLAG=n
-		;;
 	  U )   if [ -z "${PARENT_ROOT}" ]; then
 			echo "PARENT_ROOT must be set if the U flag is" \
 			    "present in NIGHTLY_OPTIONS."
@@ -1313,22 +1304,20 @@
 		build_extras_ok=n
 	fi
 
-	if [[ "$t_FLAG" = "y" ]]; then
-		echo "\n==== Make tools clobber at `date` ====\n" >> $LOGFILE
-		cd ${TOOLS}
-		rm -f ${TOOLS}/clobber-${MACH}.out
-		$MAKE TOOLS_PROTO=$TOOLS_PROTO -ek clobber 2>&1 | \
-			tee -a ${TOOLS}/clobber-${MACH}.out >> $LOGFILE
-		echo "\n==== Make tools clobber ERRORS ====\n" \
-			>> $mail_msg_file
-		grep "$MAKE:" ${TOOLS}/clobber-${MACH}.out \
-			>> $mail_msg_file
-		if (( $? == 0 )); then
-			build_extras_ok=n
-		fi
-		rm -rf ${TOOLS_PROTO}
-		mkdir -p ${TOOLS_PROTO}
+	echo "\n==== Make tools clobber at `date` ====\n" >> $LOGFILE
+	cd ${TOOLS}
+	rm -f ${TOOLS}/clobber-${MACH}.out
+	$MAKE TOOLS_PROTO=$TOOLS_PROTO -ek clobber 2>&1 | \
+		tee -a ${TOOLS}/clobber-${MACH}.out >> $LOGFILE
+	echo "\n==== Make tools clobber ERRORS ====\n" \
+		>> $mail_msg_file
+	grep "$MAKE:" ${TOOLS}/clobber-${MACH}.out \
+		>> $mail_msg_file
+	if (( $? == 0 )); then
+		build_extras_ok=n
 	fi
+	rm -rf ${TOOLS_PROTO}
+	mkdir -p ${TOOLS_PROTO}
 
 	typeset roots=$(allprotos)
 	echo "\n\nClearing $roots" >> "$LOGFILE"
@@ -1587,15 +1576,13 @@
 #
 # Build and use the workspace's tools if requested
 #
-if [[ "$t_FLAG" = "y" ]]; then
-	set_non_debug_build_flags
+set_non_debug_build_flags
 
-	build_tools ${TOOLS_PROTO}
-	if (( $? != 0 )); then
-		build_ok=n
-	else
-		use_tools $TOOLS_PROTO
-	fi
+build_tools ${TOOLS_PROTO}
+if (( $? != 0 )); then
+	build_ok=n
+else
+	use_tools $TOOLS_PROTO
 fi
 
 # timestamp the start of the normal build; the findunref tool uses it.