From 59fa51296fb224810ea90cba4cb30c16cd6a59ef Mon Sep 17 00:00:00 2001
From: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Date: Mon, 23 Dec 2013 12:15:43 -0500
Subject: [PATCH 1/2] 4265 remove INTERNAL_RELEASE_BUILD
 Reviewed by: Richard Lowe <richlowe@richlowe.net>

---
 usr/src/Makefile.master                        |   14 +-------------
 usr/src/cmd/sgs/libconv/Makefile.com           |    9 ---------
 usr/src/cmd/sgs/libconv/Makefile.targ          |    3 +--
 usr/src/cmd/sgs/libconv/common/bld_vernote.ksh |    2 +-
 usr/src/cmd/sgs/packages/Makefile.com          |    3 ---
 usr/src/tools/scripts/bldenv.sh                |    2 --
 usr/src/tools/scripts/nightly.1                |    8 --------
 usr/src/tools/scripts/nightly.sh               |    2 --
 usr/src/uts/Makefile.targ                      |    8 +-------
 9 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 8c16554..8fe3bd0 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -44,13 +44,6 @@ NATIVE_ADJUNCT=	/usr
 # RELEASE_BUILD should be cleared for final release builds.
 # NOT_RELEASE_BUILD is exactly what the name implies.
 #
-# INTERNAL_RELEASE_BUILD is a subset of RELEASE_BUILD. It mostly controls
-# identification strings. Enabling RELEASE_BUILD automatically enables
-# INTERNAL_RELEASE_BUILD.
-#
-# STRIP_COMMENTS toggles comment section striping. Generally the same setting
-# as INTERNAL_RELEASE_BUILD.
-#
 # __GNUC toggles the building of ON components using gcc and related tools.
 # Normally set to `#', set it to `' to do gcc build.
 #
@@ -70,10 +63,8 @@ PRE_POUND=				pre\#
 POUND_SIGN=				$(PRE_POUND:pre\%=%)
 
 NOT_RELEASE_BUILD=
-INTERNAL_RELEASE_BUILD=			$(POUND_SIGN)
 RELEASE_BUILD=				$(POUND_SIGN)
 $(RELEASE_BUILD)NOT_RELEASE_BUILD=	$(POUND_SIGN)
-$(RELEASE_BUILD)INTERNAL_RELEASE_BUILD=
 PATCH_BUILD=				$(POUND_SIGN)
 
 # SPARC_BLD is '#' for an Intel build.
@@ -83,8 +74,6 @@ SPARC_BLD=      $(SPARC_BLD_1:sparc=)
 INTEL_BLD_1=    $(MACH:sparc=$(POUND_SIGN))
 INTEL_BLD=      $(INTEL_BLD_1:i386=)
 
-STRIP_COMMENTS=	$(INTERNAL_RELEASE_BUILD)
-
 # The variables below control the compilers used during the build.
 # There are a number of permutations.
 #
@@ -968,8 +957,7 @@ PATCH_DATE=	$(RELEASE_DATE)
 RELEASE_CM=	"@($(POUND_SIGN))SunOS $(RELEASE) $(PATCHID) $(PATCH_DATE)"
 DEV_CM=		"@($(POUND_SIGN))SunOS Internal Development: non-nightly build"
 
-PROCESS_COMMENT=		   @?${MCS} -c -a $(RELEASE_CM) -a $(DEV_CM)
-$(STRIP_COMMENTS)PROCESS_COMMENT=  @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM)
+PROCESS_COMMENT=  @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM)
 $(RELEASE_BUILD)PROCESS_COMMENT=   @?${MCS} -d -a $(RELEASE_CM)
 
 STRIP_STABS=			   :
diff --git a/usr/src/cmd/sgs/libconv/Makefile.com b/usr/src/cmd/sgs/libconv/Makefile.com
index 933176f..d95213e 100644
--- a/usr/src/cmd/sgs/libconv/Makefile.com
+++ b/usr/src/cmd/sgs/libconv/Makefile.com
@@ -113,15 +113,6 @@ LINTSRCS=	$(COMOBJS:%.o=../common/%.c) \
 LINTSRCS32 =	$(COMOBJS32:%32.o=../common/%.c)
 LINTSRCS64 =	$(COMOBJS64:%64.o=../common/%.c)
 
-# INTERNAL_RELEASE_BUILD is defined by standard full builds (nightly),
-# but not for sgs builds we do for development. The result of these
-# two lines is that dev builds pass -d to the readme_revision script,
-# generating a more detailed version string for the linker components
-# that includes the workspace, user, CR, and date. Official builds get
-# a simpler uncluttered version string.
-VERNOTE_DEBUG= -d
-$(INTERNAL_RELEASE_BUILD)VERNOTE_DEBUG=
-
 SGSMSGTARG=	$(BLTOBJS:%_msg.o=../common/%.msg)
 
 LINTFLAGS +=	-u
diff --git a/usr/src/cmd/sgs/libconv/Makefile.targ b/usr/src/cmd/sgs/libconv/Makefile.targ
index 1473253..9e23179 100644
--- a/usr/src/cmd/sgs/libconv/Makefile.targ
+++ b/usr/src/cmd/sgs/libconv/Makefile.targ
@@ -68,8 +68,7 @@ $(SGSMSG):	FRC
 
 vernote.s:	bld_vernote $(README_REVISION) $(ONLDREADME)
 		./bld_vernote \
-			-R `perl $(README_REVISION) $(VERNOTE_DEBUG) \
-				$(ONLDREADME)` \
+			-R `perl $(README_REVISION) $(ONLDREADME)` \
 			-r "$(RELEASE)" -o $@
 
 bld_vernote:	../common/bld_vernote.ksh
diff --git a/usr/src/cmd/sgs/libconv/common/bld_vernote.ksh b/usr/src/cmd/sgs/libconv/common/bld_vernote.ksh
index 1ca0564..6f83eb9 100644
--- a/usr/src/cmd/sgs/libconv/common/bld_vernote.ksh
+++ b/usr/src/cmd/sgs/libconv/common/bld_vernote.ksh
@@ -108,7 +108,7 @@ notefile=""
 release=""
 revision=""
 
-while getopts DR:o:r: c
+while getopts R:o:r: c
 do
 	case $c in
 	o)
diff --git a/usr/src/cmd/sgs/packages/Makefile.com b/usr/src/cmd/sgs/packages/Makefile.com
index 714a8f0..0dbf8d5 100644
--- a/usr/src/cmd/sgs/packages/Makefile.com
+++ b/usr/src/cmd/sgs/packages/Makefile.com
@@ -35,9 +35,6 @@ PACKAGE= 	SUNWonld
 ROOTONLD=	$(ROOT)/opt/SUNWonld
 ROOTREADME=	$(README:%=$(ROOTONLD)/%)
 
-VERDEBUG=	-D
-$(INTERNAL_RELEASE_BUILD)VERDEBUG=
-
 CLEANFILES=	$(FILES) awk_pkginfo ../bld_awk_pkginfo $(LINTLOG)
 CLOBBERFILES=	$(PACKAGE) $(LINTLOG).bak
 
diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv.sh
index b381dbb..c9f67d0 100644
--- a/usr/src/tools/scripts/bldenv.sh
+++ b/usr/src/tools/scripts/bldenv.sh
@@ -248,8 +248,6 @@ BASEWSDIR=$(basename -- "${CODEMGR_WS}")
 DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
 export DEV_CM RELEASE_DATE POUND_SIGN
 
-export INTERNAL_RELEASE_BUILD=
-
 print 'Build type   is  \c'
 if ${flags.d} ; then
 	print 'DEBUG'
diff --git a/usr/src/tools/scripts/nightly.1 b/usr/src/tools/scripts/nightly.1
index 577fe29..e11c961 100644
--- a/usr/src/tools/scripts/nightly.1
+++ b/usr/src/tools/scripts/nightly.1
@@ -421,14 +421,6 @@ your environment file, then this text defaults to the output from
 $(LC_ALL=C date +"%B %Y"); e.g., "October 2009".
 .RE
 .LP
-.B INTERNAL_RELEASE_BUILD
-.RS 5
-See Makefile.master - but it mostly controls id strings. Generally,
-let
-.I nightly
-set this for you.
-.RE
-.LP
 .B RELEASE_BUILD
 .RS 5
 Define this to build a release with a non-DEBUG kernel. 
diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh
index f0114f8..664c05f 100644
--- a/usr/src/tools/scripts/nightly.sh
+++ b/usr/src/tools/scripts/nightly.sh
@@ -759,14 +759,12 @@ function do_wsdiff {
 #
 
 function set_non_debug_build_flags {
-	export INTERNAL_RELEASE_BUILD ; INTERNAL_RELEASE_BUILD=
 	export RELEASE_BUILD ; RELEASE_BUILD=
 	unset EXTRA_OPTIONS
 	unset EXTRA_CFLAGS
 }
 
 function set_debug_build_flags {
-	export INTERNAL_RELEASE_BUILD ; INTERNAL_RELEASE_BUILD=
 	unset RELEASE_BUILD
 	unset EXTRA_OPTIONS
 	unset EXTRA_CFLAGS
diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ
index 8915cc2..034817d 100644
--- a/usr/src/uts/Makefile.targ
+++ b/usr/src/uts/Makefile.targ
@@ -112,16 +112,10 @@ $(LINTS_DIR)/modstubs.ln:	$(MODSTUBS)
 #
 # Build environment information is only contained in the comment section.
 #
-# The version string, normally the variable VERSION, is set to display
-# environmental information temporarily while in development because
-# it provides a little more useful information.
-#
-VERSION_STRING	= ($(ECHO) $$LOGNAME [\`basename $$CODEMGR_WS\`] \\\c; date +%D)
-$(INTERNAL_RELEASE_BUILD)VERSION_STRING = $(ECHO) $(PATCHID)
 
 $(OBJS_DIR)/vers.o: $(OBJECTS)
 	$(COMPILE.c) -DUTS_RELEASE=\"`$(ECHO) $(RELEASE) | sed -e 's/ /_/g'`\" \
-	    -DUTS_VERSION=\"`$(VERSION_STRING) | sed -e 's/ /_/g'`\" \
+	    -DUTS_VERSION=\"`$(ECHO) $(PATCHID) | sed -e 's/ /_/g'`\" \
 	    -DUTS_PLATFORM=\"$(UNAME_M)\" -o $@ $(SRC)/uts/common/os/vers.c
 	$(CTFCONVERT_O)
 	$(POST_PROCESS_O)
-- 
1.7.3.2

