diff options
author | John Levon <john.levon@joyent.com> | 2020-01-22 03:28:42 -0800 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2020-01-27 02:59:37 -0800 |
commit | 5ca82e6914c4162ba9b7028b19c9d77d3eadaf17 (patch) | |
tree | 369e7850a9fd7371c869befe17ad8361f2518c06 /usr/src/tools/scripts | |
parent | e90dc2b3580db8c2b04f138bba39aef292972dd2 (diff) | |
download | illumos-gate-5ca82e6914c4162ba9b7028b19c9d77d3eadaf17.tar.gz |
11224 nightly and bldenv should be usable directly
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Alexander Eremin <a.eremin@nexenta.com>
Reviewed by: Alexander Pyhalov <apyhalov@gmail.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src/tools/scripts')
-rw-r--r-- | usr/src/tools/scripts/Makefile | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | usr/src/tools/scripts/bldenv (renamed from usr/src/tools/scripts/bldenv.sh) | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | usr/src/tools/scripts/nightly (renamed from usr/src/tools/scripts/nightly.sh) | 6 | ||||
-rw-r--r-- | usr/src/tools/scripts/stdenv.sh | 48 |
4 files changed, 11 insertions, 78 deletions
diff --git a/usr/src/tools/scripts/Makefile b/usr/src/tools/scripts/Makefile index 1ec73ce144..85ed6fb789 100644 --- a/usr/src/tools/scripts/Makefile +++ b/usr/src/tools/scripts/Makefile @@ -23,13 +23,16 @@ # # Copyright 2010, Richard Lowe # -# Copyright 2018 Joyent, Inc. +# Copyright 2020 Joyent, Inc. SHELL=/usr/bin/ksh93 +SCRIPTS= \ + bldenv \ + nightly + SHFILES= \ Install \ - bldenv \ build_cscope \ bringovercheck \ checkpaths \ @@ -37,7 +40,6 @@ SHFILES= \ elfcmp \ flg.flp \ genoffsets \ - nightly \ onu \ protocmp.terse \ sccscheck \ @@ -130,7 +132,7 @@ $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644 .KEEP_STATE: all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \ - $(MAN1ONBLDFILES) $(MAKEFILES) + $(MAN1ONBLDFILES) $(MAKEFILES) $(SCRIPTS) onu.sh: onu.sh.in $(SED) -e "s:@PYTHON_VERSION@:$(PYTHON_VERSION):g" < onu.sh.in > $@ @@ -147,20 +149,12 @@ install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \ $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \ $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1ONBLDFILES) \ $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) \ - $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS) + $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS) \ + $(ROOTONBLDSCRIPTS) clean: $(RM) $(CLEANFILES) -bldenv: bldenv.sh stdenv.sh - $(RM) "$@" - sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@" - # Check for shell lint and fail if we hit warnings - shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \ - [[ "$${shlintout}" != "" ]] && \ - { print -r -- "$${shlintout}" ; false ; } || true - $(CHMOD) +x "$@" - bldenv.1onbld: bldenv $(RM) "$@" (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \ @@ -169,11 +163,6 @@ bldenv.1onbld: bldenv -e 's/.OP \([a-z]\) - flag -/.OP \\-\1/g' \ -e 's/(1)/(1ONBLD)/' > "$@" -nightly: nightly.sh stdenv.sh - $(RM) "$@" - sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly - $(CHMOD) +x "$@" - # # Not run by default: bootstrap... check: diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv index 43c5c56392..85999e5b77 100644..100755 --- a/usr/src/tools/scripts/bldenv.sh +++ b/usr/src/tools/scripts/bldenv @@ -24,7 +24,7 @@ # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2014 Garrett D'Amore <garrett@damore.org> -# Copyright 2018 Joyent, Inc. +# Copyright 2020 Joyent, Inc. # # 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 @@ -221,16 +221,12 @@ else fi shift -# contents of stdenv.sh inserted after next line: -# STDENV_START -# STDENV_END - # Check if we have sufficient data to continue... [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set." [[ -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 +# must match the getopts in nightly OPTIND=1 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}" while getopts '+0ABCDdFfGIilMmNnpRrtUuwW' FLAG $NIGHTLY_OPTIONS diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly index 8641236b6c..f4f10fda9c 100644..100755 --- a/usr/src/tools/scripts/nightly.sh +++ b/usr/src/tools/scripts/nightly @@ -26,7 +26,7 @@ # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> # Copyright (c) 2017 by Delphix. All rights reserved. -# Copyright 2019 Joyent, Inc. +# Copyright 2020 Joyent, Inc. # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # Copyright 2019 Peter Trible. # @@ -666,10 +666,6 @@ else fi fi -# contents of stdenv.sh inserted after next line: -# STDENV_START -# STDENV_END - # Check if we have sufficient data to continue... [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set." if [[ "${NIGHTLY_OPTIONS}" == ~(F)n ]] ; then diff --git a/usr/src/tools/scripts/stdenv.sh b/usr/src/tools/scripts/stdenv.sh deleted file mode 100644 index 50f4c4a5cc..0000000000 --- a/usr/src/tools/scripts/stdenv.sh +++ /dev/null @@ -1,48 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Shell script fragment to set standard build environment variables, -# for use by bldenv(1) and nightly(1). Can be overridden by the -# user's environment file. Because bldenv and nightly are both ksh -# scripts, we can use ksh syntax here. -# - -# -# OPEN_SRCDIR is where we copy the open tree to so that we can be sure -# we don't have a hidden dependency on closed code. The name ends in -# "DIR" to avoid confusion with the flags related to open source -# builds. -# -[ -n "$OPEN_SRCDIR" ] || export OPEN_SRCDIR="$CODEMGR_WS/open_src" - -# -# Flag to enable creation of per-build-type proto areas. If "yes", -# more proto areas are created, which speeds up incremental builds but -# increases storage consumption. Will be forced to "yes" for -# OpenSolaris deliveries. -# -[ -n "$MULTI_PROTO" ] || export MULTI_PROTO=no |