Print this page
4030 remove useless nightly/bldenv options
Reviewed by: Andy Stormont <andyjstormont@gmail.com>

@@ -40,37 +40,10 @@
     OPTIND=0
     getopts -a "${progname}" "${USAGE}" OPT '-?'
     exit 2
 }
 
-function is_source_build
-{
-        "${flags.s.e}" || "${flags.s.d}" || "${flags.s.h}" || "${flags.s.o}"
-        return $?
-}
-
-#
-# single function for setting -S flag and doing error checking.
-# usage: set_S_flag <type>
-# where <type> is the source build type ("E", "D", ...).
-#
-function set_S_flag
-{
-        if is_source_build; then
-                print 'Can only build one source variant at a time.'
-                exit 1
-        fi
-        
-        case "$1" in
-                "E") flags.s.e=true ;;
-                "D") flags.s.d=true ;;
-                "H") flags.s.h=true ;;
-                "O") flags.s.o=true ;;
-                *)   usage ;;
-        esac
-}
-
 typeset -r USAGE=$'+
 [-?\n@(#)\$Id: bldenv (OS/Net) 2008-04-06 \$\n]
 [-author?OS/Net community <tools-discuss@opensolaris.org>]
 [+NAME?bldenv - spawn shell for interactive incremental OS-Net
     consolidation builds]

@@ -87,37 +60,19 @@
     other shell metacharacters, it must be quoted appropriately.]
 [+?bldenv is particularly useful for testing Makefile targets
     like clobber, install and _msg, which otherwise require digging
     through large build logs to figure out what is being
     done.]
-[+?bldenv is also useful if you run into build issues with the
-    source product or when generating OpenSolaris deliverables.
-    If a source product build is flagged, the environment is set
-    up for building the indicated source product tree, which is
-    assumed to have already been created. If the OpenSolaris
-    deliverables flag (-O) is set in NIGHTLY_OPTIONS, the
-    environment is set up for building just the open source.
-    This includes using an alternate proto area, as well as
-    using the closed binaries in $CODEMGR_WS/closed.skel (which
-    is assumed to already exist).]
 [+?By default, bldenv will invoke the shell specified in
     $SHELL. If $SHELL is not set or is invalid, csh will be
     used.]
 [c?force the use of csh, regardless of the  value  of $SHELL.]
 [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)]
-[S]:[option?Build a variant of the source product.
-The value of \aoption\a must be one of the following:]{
-       [+E?build the exportable source variant of the source product.]
-       [+D?build the domestic  source  (exportable + crypt) variant of
-           the source product.]
-       [+H?build hybrid source (binaries + deleted source).]
-       [+O?simulate an OpenSolaris (open source only) build.]
-}
 
 <env_file> [command]
 
 [+EXAMPLES]{
     [+?Example 1: Interactive use]{

@@ -186,11 +141,10 @@
           +f)   flags.f=false ;;
           d)    flags.d=true  SUFFIX=""    ;;
           +d)   flags.d=false SUFFIX="-nd" ;;
           t)    flags.t=true  ;;
           +t)   flags.t=false ;;
-          S)    set_S_flag "$OPTARG" ;;
           \?)   usage ;;
     esac
 done
 shift $((OPTIND-1))
 

@@ -271,20 +225,17 @@
 [[ -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 '+0AaBCDdFfGIilMmNnOopRrS:tUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
+while getopts '+0AaBCDdFfGIilMmNnopRrtUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
 do
         case "$FLAG" in
-          O)    flags.O=true  ;;
-          +O)   flags.O=false ;;
           o)    flags.o=true  ;;
           +o)   flags.o=false ;;
           t)    flags.t=true  ;;
           +t)   flags.t=false ;;
-          S)    set_S_flag "$OPTARG" ;;
           *)    ;;
         esac
 done
 
 POUND_SIGN="#"

@@ -311,36 +262,13 @@
         export RELEASE_BUILD=
         unset EXTRA_OPTIONS
         unset EXTRA_CFLAGS
 fi
 
-[[ "${flags.O}" == "true" ]] && export MULTI_PROTO="yes"
-
 # update build-type variables
 PKGARCHIVE="${PKGARCHIVE}${SUFFIX}"
 
-# Append source version
-if "${flags.s.e}" ; then
-        VERSION+=":EXPORT"
-        SRC="${EXPORT_SRC}/usr/src"
-fi
- 
-if "${flags.s.d}" ; then
-        VERSION+=":DOMESTIC"
-        SRC="${EXPORT_SRC}/usr/src"
-fi
-
-if "${flags.s.h}" ; then
-        VERSION+=":HYBRID"
-        SRC="${EXPORT_SRC}/usr/src"
-fi
- 
-if "${flags.s.o}" ; then
-        VERSION+=":OPEN_ONLY"
-        SRC="${OPEN_SRCDIR}/usr/src"
-fi
-
 #       Set PATH for a build
 PATH="/opt/onbld/bin:/opt/onbld/bin/${MACH}:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/etc:/usr/openwin/bin:/usr/sfw/bin:/opt/sfw/bin:."
 if [[ "${SUNWSPRO}" != "" ]]; then 
         export PATH="${SUNWSPRO}/bin:$PATH" 
 fi 

@@ -408,16 +336,10 @@
         export MULTI_PROTO="no"
 fi
 
 [[ "$MULTI_PROTO" == "yes" ]] && export ROOT="${ROOT}${SUFFIX}"
 
-if "${flags.O}" ; then 
-        print "OpenSolaris closed binary generation requires "
-        print "closed tree"
-        exit 1
-fi
-
 ENVLDLIBS1="-L$ROOT/lib -L$ROOT/usr/lib"
 ENVCPPFLAGS1="-I$ROOT/usr/include"
 MAKEFLAGS=e
 
 export \