summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-01-22 03:28:42 -0800
committerJohn Levon <john.levon@joyent.com>2020-01-27 02:59:37 -0800
commit5ca82e6914c4162ba9b7028b19c9d77d3eadaf17 (patch)
tree369e7850a9fd7371c869befe17ad8361f2518c06 /usr/src
parente90dc2b3580db8c2b04f138bba39aef292972dd2 (diff)
downloadillumos-joyent-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')
-rw-r--r--usr/src/tools/Makefile.tools2
-rw-r--r--usr/src/tools/env/illumos.sh4
-rw-r--r--usr/src/tools/scripts/Makefile27
-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.sh48
6 files changed, 15 insertions, 80 deletions
diff --git a/usr/src/tools/Makefile.tools b/usr/src/tools/Makefile.tools
index 867c55b2f4..3659548cee 100644
--- a/usr/src/tools/Makefile.tools
+++ b/usr/src/tools/Makefile.tools
@@ -20,6 +20,7 @@
#
#
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2020 Joyent, Inc.
#
# Definitions common to tool source.
#
@@ -60,6 +61,7 @@ LDFLAGS= $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \
CW_LINKER=
ROOTONBLDPROG= $(PROG:%=$(ROOTONBLDBIN)/%)
+ROOTONBLDSCRIPTS= $(SCRIPTS:%=$(ROOTONBLDBIN)/%)
ROOTONBLDMACHPROG= $(PROG:%=$(ROOTONBLDBINMACH)/%)
ROOTONBLDSHFILES= $(SHFILES:%=$(ROOTONBLDBIN)/%)
ROOTONBLDMAKEFILES= $(MAKEFILES:%=$(ROOTONBLDBIN)/%)
diff --git a/usr/src/tools/env/illumos.sh b/usr/src/tools/env/illumos.sh
index 03c524fdeb..2c4f7d5beb 100644
--- a/usr/src/tools/env/illumos.sh
+++ b/usr/src/tools/env/illumos.sh
@@ -24,9 +24,9 @@
# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2016 RackTop Systems.
# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
-# Copyright 2019, Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
-# - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
+# - This file is sourced by "bldenv" and "nightly" and should not
# be executed directly.
# - This script is only interpreted by ksh93 and explicitly allows the
# use of ksh93 language extensions.
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