aboutsummaryrefslogtreecommitdiff
path: root/boot-strap
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2025-12-03 17:57:57 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2025-12-03 17:57:57 +0000
commit638c66de4a0faa4c2e815e81cd4021c2387c7e0f (patch)
tree501a9007f873e948a69c658104c34838ddaac038 /boot-strap
parent787302bde4d89279180303b753eb73b9bc6820b9 (diff)
Intersting/relevant changes since bmake-20250804 ChangeLog since bmake-20250804 2025-11-15 Simon J Gerraty <sjg@beast.crufty.net> * boot-strap: unset more things from env and save a copy to env.out for debugging. 2025-11-12 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20251111 Merge with NetBSD make, pick up o var.c: add :sh1 which only evaluates command on first reference. 2025-11-11 Simon J Gerraty <sjg@beast.crufty.net> * configure.in: Force filemon=no for Cygwin and MINGW64_NT 2025-11-10 Simon J Gerraty <sjg@beast.crufty.net> * unit-tests/Makefile: handle MINGW64_NT mark some tests broken, filter others as per Cygwin. 2025-10-23 Simon J Gerraty <sjg@beast.crufty.net> * make.1: document MAKE_VERSION. 2025-10-22 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20251022 * configure.in: Add a check that lua is version 5.2 or later if not we want to skip running check-expect.lua 2025-09-16 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20250916 Merge with NetBSD make, pick up o var.c: avoid compiler warning from hexdigits mk/ChangeLog since bmake-20250804 2025-11-18 Simon J Gerraty <sjg@beast.crufty.net> * sys.vars.mk: set MAKE_POSIX_SHELL to 1 if .SHELL is POSIX, 0 if not. set isPOSIX_SHELL for use in target scripts. * meta.stage.mk: set MAKE_POSIX_SHELL if needed. * install-new.mk: use ${isPOSIX_SHELL:Ufalse} to see if we can avoid running 'expr'. * install-new.mk: Allow use of cp or mv - controlled by CPMV_OP (default mv). 2025-11-13 Simon J Gerraty <sjg@beast.crufty.net> * sys.vars.mk: add M_sh1 so we can handle older bmake that does not support :sh1 2025-11-11 Simon J Gerraty <sjg@beast.crufty.net> * install-mk (MK_VERSION): 20251111 * meta2deps.sh: reset some vars for each new meta file set meta_file to path of meta file. If meta2deps appears in DEBUG_SH set -x. 2025-09-16 Simon J Gerraty <sjg@beast.crufty.net> * options.mk: Add OPTIONS_DEFAULT_DEPENDENT_REQUIRED of the form OPTION/REQUIRED[/VALUE] if OPTION is $VALUE (default is "yes"), then REQUIRED must be too. We add OPTIONS_DEFAULT_DEPENDENT_REQUIRED (sans any /{yes,no}) to OPTIONS_DEFAULT_DEPENDENT so DEPENDENT/REQUIRED follow the same processing. Also add OPTIONS_FORCED_VALUES of the form OPTION/{yes,no} we add any OPTIONS_FORCED_NO and OPTIONS_FORCED_YES before processing. Simplify the processing of OPTIONS_DEFAULT_VALUES and OPTIONS_DEFAULT_DEPENDENT by splitting the tuples and use two iterator variables in the .for loops. 2025-08-09 Simon J Gerraty <sjg@beast.crufty.net> * install-mk (MK_VERSION): 20250808 * replace sjg license with just BSD-2-Clause SPDX tag
Diffstat (limited to 'boot-strap')
-rwxr-xr-xboot-strap23
1 files changed, 19 insertions, 4 deletions
diff --git a/boot-strap b/boot-strap
index b025de52a82b..51e81083b95b 100755
--- a/boot-strap
+++ b/boot-strap
@@ -133,7 +133,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: boot-strap,v 1.61 2024/03/10 17:51:10 sjg Exp $
+# $Id: boot-strap,v 1.62 2025/11/15 16:53:14 sjg Exp $
#
# @(#) Copyright (c) 2001 Simon J. Gerraty
#
@@ -179,12 +179,25 @@ source_rc() {
done
}
+have() {
+ case `(type "$1") 2>&1` in
+ *" found") return 1;;
+ esac
+ return 0
+}
+
+Env() {
+ have env && env || set
+}
+
cmd_args="$@"
# clear some things from the environment that we care about
-unset MAKEOBJDIR MAKEOBJDIRPREFIX
-# or that might be incompatible
-unset MAKE MAKEFLAGS
+# any variable starting with any of these prefixes will be unset
+for p in MAKE OBJ SB WITH
+do
+ unset ENV `Env | sed -n "/^$p/s,=.*,,p"`
+done
# --install[-host-target] will set this
INSTALL_PREFIX=
@@ -381,6 +394,8 @@ objdir="${objdir:-$OBJROOT$HOST_TARGET}"
cd "$objdir" || exit 1
# make it absolute
objdir=`'pwd'`
+# save a copy of our env for debugging
+Env > env.out
ShareDir() {
case "/$1" in