changeset 10517:43ea36a8f8b6

6878057 clean up false unref for usr/src/pkgdefs/SUNW0on/Makefile
author Mark J. Nelson <Mark.J.Nelson@Sun.COM>
date Mon, 14 Sep 2009 10:15:43 -0600
parents 73cc1414bac0
children 5e20d81ceb17
files usr/src/tools/env/developer.sh usr/src/tools/env/gatekeeper.sh usr/src/tools/env/opensolaris.sh usr/src/tools/scripts/bldenv.sh usr/src/tools/scripts/nightly.1 usr/src/tools/scripts/nightly.sh
diffstat 6 files changed, 75 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/env/developer.sh	Mon Sep 14 10:13:26 2009 -0700
+++ b/usr/src/tools/env/developer.sh	Mon Sep 14 10:15:43 2009 -0600
@@ -47,6 +47,9 @@
 # CODEMGR_WS - where is your workspace at (or what should nightly name it)
 CODEMGR_WS="/builds/$GATE";			export CODEMGR_WS
 
+# G11N_PKGDIR - where does the globalization package live
+G11N_PKGDIR="$CODEMGR_WS/usr/src/pkgdefs/SUNW0on";	export G11N_PKGDIR
+
 # PARENT_WS is used to determine the parent of this workspace. This is
 # for the options that deal with the parent workspace (such as where the
 # proto area will go).
--- a/usr/src/tools/env/gatekeeper.sh	Mon Sep 14 10:13:26 2009 -0700
+++ b/usr/src/tools/env/gatekeeper.sh	Mon Sep 14 10:15:43 2009 -0600
@@ -33,6 +33,7 @@
 # area are put into the parent for everyone to use). It is based off
 # the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
 #	DEBUG and non-DEBUG builds (-D)
+#	creates a globalization package (-0)
 #	creates cpio archives for bfu (-a)
 #	creates packages for PIT/RE (-p)
 #	checks for new interfaces in libraries (-A)
@@ -44,7 +45,7 @@
 #	checks for changes in ELF runpaths (-r)
 #	checks for changes in unreferenced files (-f)
 #
-NIGHTLY_OPTIONS="-aADClmpuUrf";		export NIGHTLY_OPTIONS
+NIGHTLY_OPTIONS="-0aADClmpuUrf";		export NIGHTLY_OPTIONS
 
 # This is a variable for the rest of the script - GATE doesn't matter to
 # nightly itself
@@ -56,6 +57,9 @@
 # you _could_ look at $MACH or `uname -n` and set these variables differently.
 CODEMGR_WS="/builds/$GATE";			export CODEMGR_WS
 
+# G11N_PKGDIR - where does the globalization package live
+G11N_PKGDIR="$CODEMGR_WS/usr/src/pkgdefs/SUNW0on";	export G11N_PKGDIR
+
 # PARENT_WS is used to determine the parent of this workspace. This is
 # for the options that deal with the parent workspace (such as where the
 # proto area will go).
--- a/usr/src/tools/env/opensolaris.sh	Mon Sep 14 10:13:26 2009 -0700
+++ b/usr/src/tools/env/opensolaris.sh	Mon Sep 14 10:15:43 2009 -0600
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -47,6 +47,9 @@
 # CODEMGR_WS - where is your workspace at (or what should nightly name it)
 CODEMGR_WS="/export/$GATE";			export CODEMGR_WS
 
+# G11N_PKGDIR - where does the globalization package live
+G11N_PKGDIR="$CODEMGR_WS/usr/src/pkgdefs/SUNW0on";	export G11N_PKGDIR
+
 # Location of encumbered binaries.
 ON_CLOSED_BINS="$CODEMGR_WS/closed";		export ON_CLOSED_BINS
 
--- a/usr/src/tools/scripts/bldenv.sh	Mon Sep 14 10:13:26 2009 -0700
+++ b/usr/src/tools/scripts/bldenv.sh	Mon Sep 14 10:15:43 2009 -0600
@@ -264,7 +264,7 @@
 # must match the getopts in nightly.sh
 OPTIND=1
 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
-while getopts '+AaBCDdFfGIilMmNnOopRrS:tUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
+while getopts '+0AaBCDdFfGIilMmNnOopRrS:tUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
 do
 	case "$FLAG" in
 	  O)	flags.O=true  ;;
--- a/usr/src/tools/scripts/nightly.1	Mon Sep 14 10:13:26 2009 -0700
+++ b/usr/src/tools/scripts/nightly.1	Mon Sep 14 10:15:43 2009 -0600
@@ -1,4 +1,3 @@
-.\" ident	"%Z%%M%	%I%	%E% SMI"
 .\" " CDDL HEADER START
 .\" "
 .\" " The contents of this file are subject to the terms of the
@@ -18,9 +17,9 @@
 .\" "
 .\" " CDDL HEADER END
 .\" "
-.\" "Copyright 2008 Sun Microsystems, Inc.  All rights reserved."
+.\" "Copyright 2009 Sun Microsystems, Inc.  All rights reserved."
 .\" "Use is subject to license terms."
-.TH nightly 1 "18 June 2008"
+.TH nightly 1 "08 Sep 2009"
 .SH NAME
 .I nightly
 \- build an OS-Net consolidation overnight
@@ -151,6 +150,12 @@
 Do an "old style" (pre-S10) build using root privileges to set OWNER
 and GROUP from the Makefiles.
 .TP
+.B \-0
+Create a globalization package.  Requires that G11N_PKGDIR be set
+in the build environment.  See 
+.B ENVIRONMENT VARIABLES
+below.
+.TP
 .B \-a
 Create BFU archives
 .TP
@@ -192,7 +197,8 @@
 .B \-f
 Check for unreferenced files.  Since the full workspace must be built
 in order to accurately identify unreferenced files, -f is ignored for
-incremental (-i) builds, or builds that do not include -l and -p.
+incremental (-i) builds, or builds that do not include -l, and -p.  In
+addition, -f implies -0.
 .TP
 .B \-r
 Check the ELF runtime attributes of all dynamic objects
@@ -217,7 +223,7 @@
 .B Groups of options
 .TP 10
 .B \-G
-Gate keeper default group of options (-au)
+Gate keeper default group of options (-0au)
 .TP
 .B \-I
 Integration engineer default group of options (-ampu)
@@ -333,6 +339,15 @@
 in terms of $CODEMGR_WS.
 .RE
 .LP
+.B G11N_PKGDIR
+.RS 5
+The location of the globalization package directory.  It should be
+expressed in terms of $CODEMGR_WS.  If this is not set, then the -0
+option will be ignored, whether it was set explicitly in
+NIGHTLY_OPTIONS or implicitly via the -f option.  If this is set, but
+the diretory does not exist, the -0 option will have no effect.  
+.RE
+.LP
 .B ROOT
 .RS 5
 Root of the proto area for the build.  The makefiles direct
--- a/usr/src/tools/scripts/nightly.sh	Mon Sep 14 10:13:26 2009 -0700
+++ b/usr/src/tools/scripts/nightly.sh	Mon Sep 14 10:15:43 2009 -0600
@@ -103,6 +103,7 @@
 
 	typeset orig_p_FLAG="$p_FLAG"
 	typeset orig_a_FLAG="$a_FLAG"
+	typeset orig_zero_FLAG="$zero_FLAG"
 
 	suffix=""
 	open_only=""
@@ -113,6 +114,7 @@
 			open_only="open-only"
 			p_FLAG=n
 			a_FLAG=n
+			zero_FLAG=n
 			;;
 		esac
 	done
@@ -152,6 +154,7 @@
 
 	p_FLAG="$orig_p_FLAG"
 	a_FLAG="$orig_a_FLAG"
+	zero_FLAG="$orig_zero_FLAG"
 }
 
 #
@@ -572,6 +575,22 @@
 	/bin/time $MAKE -e install 2>&1 | \
 	    tee -a $SRC/${INSTALLOG}.out >> $LOGFILE
 
+	if [[ "$zero_FLAG" = "y" ]]; then
+		if [[ -d "${G11N_PKGDIR}" ]]; then
+			echo "\n==== Building globalization package" \
+			    "$(basename ${G11N_PKGDIR}) ($LABEL) ====\n" \
+			    >> $LOGFILE
+			cd $G11N_PKGDIR
+			/bin/time $MAKE -e install 2>&1 | \
+			    tee -a $SRC/${INSTALLOG}.out >> $LOGFILE
+			cd $SRC
+		else
+			echo "\n==== Skipping nonexistent globalization" \
+			    "package $(basename ${G11N_PKGDIR})" \
+			    "($LABEL) ====\n" >> $LOGFILE
+		fi
+	fi
+
 	if [[ "$SCM_TYPE" = teamware ]]; then
 		echo "\n==== SCCS Noise ($LABEL) ====\n" >> $mail_msg_file
 		egrep 'sccs(check:| *get)' $SRC/${INSTALLOG}.out >> \
@@ -1106,11 +1125,12 @@
 non-DEBUG is the default build type. Build options can be set in the
 NIGHTLY_OPTIONS variable in the <env_file> as follows:
 
+	-0	build the globalization package
 	-A	check for ABI differences in .so files
 	-C	check for cstyle/hdrchk errors
 	-D	do a build with DEBUG on
 	-F	do _not_ do a non-DEBUG build
-	-G	gate keeper default group of options (-au)
+	-G	gate keeper default group of options (-0au)
 	-I	integration engineer default group of options (-ampu)
 	-M	do not run pmodes (safe file permission checker)
 	-N	do not run protocmp
@@ -1149,6 +1169,7 @@
 #
 
 # default values for low-level FLAGS; G I R are group FLAGS
+zero_FLAG=n
 A_FLAG=n
 a_FLAG=n
 C_FLAG=n
@@ -1378,9 +1399,11 @@
 #
 NIGHTLY_OPTIONS=-${NIGHTLY_OPTIONS#-}
 OPTIND=1
-while getopts AaBCDdFfGIilMmNnOoPpRrS:TtUuWwXxz FLAG $NIGHTLY_OPTIONS
+while getopts 0AaBCDdFfGIilMmNnOoPpRrS:TtUuWwXxz FLAG $NIGHTLY_OPTIONS
 do
 	case $FLAG in
+	  0 )   zero_FLAG=y
+	  	;;
 	  A )	A_FLAG=y
 		;;
 	  a )	a_FLAG=y
@@ -1395,7 +1418,8 @@
 		;;
 	  f )	f_FLAG=y
 		;;
-	  G )	a_FLAG=y
+	  G )   zero_FLAG=y
+	  	a_FLAG=y
 		u_FLAG=y
 		;;
 	  I )	a_FLAG=y
@@ -1998,11 +2022,23 @@
 		    "builds; ignoring -f\n" | tee -a $mail_msg_file >> $LOGFILE
 		f_FLAG=n
 	fi
-	if [ "$p_FLAG" != "y" -o "$l_FLAG" != "y" ]; then
-		echo "WARNING: the -f flag requires -l and -p; ignoring -f\n" | \
-		    tee -a $mail_msg_file >> $LOGFILE
+	if [ "${l_FLAG}${p_FLAG}" != "yy" ]; then
+		echo "WARNING: the -f flag requires -l, and -p;" \
+		    "ignoring -f\n" | tee -a $mail_msg_file >> $LOGFILE
 		f_FLAG=n
 	fi
+	if [ "${f_FLAG}${zero_FLAG}" = "yn" ]; then
+		echo "WARNING: the -f flag implies -0; enabling -0\n" \
+		    | tee -a $mail_msg_file >> $LOGFILE
+		zero_FLAG=y
+	fi
+fi
+
+if [ "$zero_FLAG" = "y" -a -z "$G11N_PKGDIR" ]; then
+	echo "WARNING: the -0 flag requires that G11N_PKGDIR be set" \
+	    "in the environment; ignoring -0\n" \
+	    | tee -a $mail_msg_file >> $LOGFILE
+	zero_FLAG=n
 fi
 
 if [ "$w_FLAG" = "y" -a ! -d $ROOT ]; then