Date: Sat, 10 Jan 2026 21:34:12 +0000 From: Simon J. Gerraty <sjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c95f96dea30a - stable/14 - Update to bmake-20251111 Message-ID: <6962c5d4.26529.59af9453@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c95f96dea30a26b7d3543961db6e25e677c02c5a commit c95f96dea30a26b7d3543961db6e25e677c02c5a Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2025-12-03 18:13:30 +0000 Commit: Simon J. Gerraty <sjg@FreeBSD.org> CommitDate: 2026-01-10 21:33:13 +0000 Update to bmake-20251111 Merge commit '638c66de4a0faa4c2e815e81cd4021c2387c7e0f' (cherry picked from commit c60f6422ffae3ea85e7b10bad950ad27c463af18) --- contrib/bmake/ChangeLog | 37 ++++++ contrib/bmake/FILES | 2 + contrib/bmake/LICENSE | 6 +- contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 13 +- contrib/bmake/bmake.cat1 | 12 +- contrib/bmake/boot-strap | 23 +++- contrib/bmake/configure | 53 ++++++-- contrib/bmake/configure.in | 36 ++++- contrib/bmake/install-sh | 11 +- contrib/bmake/main.c | 13 +- contrib/bmake/make.1 | 13 +- contrib/bmake/mk/ChangeLog | 49 +++++++ contrib/bmake/mk/auto.dep.mk | 12 +- contrib/bmake/mk/auto.obj.mk | 11 +- contrib/bmake/mk/autoconf.mk | 11 +- contrib/bmake/mk/autodep.mk | 12 +- contrib/bmake/mk/cc-wrap.mk | 11 +- contrib/bmake/mk/ccm.dep.mk | 12 +- contrib/bmake/mk/compiler.mk | 11 +- contrib/bmake/mk/cython.mk | 12 +- contrib/bmake/mk/dirdeps-cache-update.mk | 11 +- contrib/bmake/mk/dirdeps-options.mk | 11 +- contrib/bmake/mk/dirdeps-targets.mk | 18 +-- contrib/bmake/mk/dpadd.mk | 11 +- contrib/bmake/mk/files.mk | 11 +- contrib/bmake/mk/gendirdeps.mk | 5 +- contrib/bmake/mk/genfiles.mk | 11 +- contrib/bmake/mk/host-target.mk | 12 +- contrib/bmake/mk/host.libnames.mk | 9 +- contrib/bmake/mk/inc.mk | 11 +- contrib/bmake/mk/init.mk | 11 +- contrib/bmake/mk/install-mk | 11 +- contrib/bmake/mk/install-new.mk | 36 ++--- contrib/bmake/mk/install-sh | 11 +- contrib/bmake/mk/java.mk | 12 +- contrib/bmake/mk/jobs.mk | 11 +- contrib/bmake/mk/ldorder.mk | 11 +- contrib/bmake/mk/libnames.mk | 11 +- contrib/bmake/mk/libs.mk | 11 +- contrib/bmake/mk/links.mk | 11 +- contrib/bmake/mk/manifest.mk | 11 +- contrib/bmake/mk/meta.autodep.mk | 12 +- contrib/bmake/mk/meta.stage.mk | 26 ++-- contrib/bmake/mk/meta.subdir.mk | 12 +- contrib/bmake/mk/meta.sys.mk | 12 +- contrib/bmake/mk/meta2deps.sh | 24 +++- contrib/bmake/mk/mkopt.sh | 10 +- contrib/bmake/mk/newlog.sh | 11 +- contrib/bmake/mk/obj.mk | 11 +- contrib/bmake/mk/options.mk | 148 ++++++++++++++------- contrib/bmake/mk/posix.mk | 11 +- contrib/bmake/mk/prlist.mk | 11 +- contrib/bmake/mk/progs.mk | 11 +- contrib/bmake/mk/rst2htm.mk | 11 +- contrib/bmake/mk/rust.mk | 12 +- contrib/bmake/mk/scripts.mk | 11 +- contrib/bmake/mk/setopts.sh | 9 +- contrib/bmake/mk/srctop.mk | 11 +- contrib/bmake/mk/stage-install.sh | 9 +- contrib/bmake/mk/subdir.mk | 11 +- contrib/bmake/mk/suffixes.mk | 11 +- contrib/bmake/mk/sys.clean-env.mk | 11 +- contrib/bmake/mk/sys.debug.mk | 11 +- contrib/bmake/mk/sys.dependfile.mk | 11 +- contrib/bmake/mk/sys.dirdeps.mk | 11 +- contrib/bmake/mk/sys.mk | 11 +- contrib/bmake/mk/sys.vars.mk | 36 +++-- contrib/bmake/mk/target-flags.mk | 13 +- contrib/bmake/mk/warnings.mk | 12 +- contrib/bmake/mk/whats.mk | 11 +- contrib/bmake/mk/yacc.mk | 12 +- contrib/bmake/os.sh | 9 +- contrib/bmake/sigaction.c | 14 +- contrib/bmake/sigcompat.c | 14 +- contrib/bmake/unit-tests/Makefile | 31 ++++- contrib/bmake/unit-tests/Makefile.config.in | 7 +- contrib/bmake/unit-tests/directive-dinclude.mk | 2 +- .../bmake/unit-tests/directive-hyphen-include.mk | 2 +- .../bmake/unit-tests/directive-include-guard.mk | 4 +- contrib/bmake/unit-tests/directive-include.mk | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 2 +- contrib/bmake/unit-tests/opt-debug-file.exp | 2 +- contrib/bmake/unit-tests/opt-debug-file.mk | 6 +- contrib/bmake/unit-tests/varmod-sun-shell1.exp | 14 ++ contrib/bmake/unit-tests/varmod-sun-shell1.mk | 25 ++++ contrib/bmake/unit-tests/varname-circumflex.mk | 4 +- contrib/bmake/var.c | 46 ++++++- contrib/bmake/wait.h | 14 +- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 31 ++++- usr.bin/bmake/unit-tests/Makefile.config | 7 +- 93 files changed, 688 insertions(+), 696 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index e8f1567733e4..11b1684bf7d5 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,40 @@ +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 + 2025-08-04 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20250804 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 28465b6a8c39..7f6024418d94 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -760,6 +760,8 @@ unit-tests/varmod-subst.exp unit-tests/varmod-subst.mk unit-tests/varmod-sun-shell.exp unit-tests/varmod-sun-shell.mk +unit-tests/varmod-sun-shell1.exp +unit-tests/varmod-sun-shell1.mk unit-tests/varmod-sysv.exp unit-tests/varmod-sysv.mk unit-tests/varmod-tail.exp diff --git a/contrib/bmake/LICENSE b/contrib/bmake/LICENSE index 0d460e91d230..28832d20a6ef 100644 --- a/contrib/bmake/LICENSE +++ b/contrib/bmake/LICENSE @@ -2,11 +2,11 @@ The individual files in this distribution are copyright their original contributors or assignees. Including: - Copyright (c) 1993-2021, Simon J Gerraty - Copyright (c) 2020, Roland Illig <rillig@NetBSD.org> + Copyright (c) 1993-2025, Simon J Gerraty + Copyright (c) 2020-2021, Roland Illig <rillig@NetBSD.org> Copyright (c) 2009-2016, Juniper Networks, Inc. Copyright (c) 2009, John Birrell. - Copyright (c) 1997-2021 The NetBSD Foundation, Inc. + Copyright (c) 1997-2025 The NetBSD Foundation, Inc. Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> Copyright (c) 1989 by Berkeley Softworks Copyright (c) 1988, 1989, 1990, 1992, 1993 diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index e301cfafab72..2c7c307f2a90 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250804 +_MAKE_VERSION=20251111 diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 01f173bc1a69..a9de459de862 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ +.\" $NetBSD: make.1,v 1.388 2025/11/12 22:14:07 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 2, 2025 +.Dd November 11, 2025 .Dt BMAKE 1 .Os .Sh NAME @@ -945,6 +945,11 @@ include additional unexpanded variable references) are shown. .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va MAKE_VERSION +This variable indicates the version of +.Nm . +It is typically the date of last import from NetBSD. +It is useful for checking whether certain features are available. .It Va MAKEFILE The top-level makefile that is currently read, as given in the command line. @@ -1881,6 +1886,10 @@ The output of running is the value. .It Cm \&:sh The value is run as a command, and the output becomes the new value. +.It Cm \&:sh1 +The value is run as a command, for the first reference only, and +the output is cached for subsequent references. +This modifier is useful when the result is not expected to change. .It Cm \&::= Ns Ar str The variable is assigned the value .Ar str diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 950437a8db9c..baaad7b4ed70 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -607,6 +607,11 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS _._M_A_K_E_._E_X_P_O_R_T_E_D The list of variables exported by bbmmaakkee. + _M_A_K_E___V_E_R_S_I_O_N + This variable indicates the version of bbmmaakkee. It is typically + the date of last import from NetBSD. It is useful for checking + whether certain features are available. + _M_A_K_E_F_I_L_E The top-level makefile that is currently read, as given in the command line. @@ -1190,6 +1195,11 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS ::sshh The value is run as a command, and the output becomes the new value. + ::sshh11 + The value is run as a command, for the first reference only, and the + output is cached for subsequent references. This modifier is useful + when the result is not expected to change. + ::::==_s_t_r The variable is assigned the value _s_t_r after substitution. This modifier and its variations are useful in obscure situations such as @@ -1864,4 +1874,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.2-RELEASE-p1 July 2, 2025 FreeBSD 14.2-RELEASE-p1 +FreeBSD 14.3-RELEASE-p3 November 11, 2025 FreeBSD 14.3-RELEASE-p3 diff --git a/contrib/bmake/boot-strap b/contrib/bmake/boot-strap index b025de52a82b..51e81083b95b 100755 --- a/contrib/bmake/boot-strap +++ b/contrib/bmake/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 diff --git a/contrib/bmake/configure b/contrib/bmake/configure index e34740cd2cfa..9bbdb8d2b36b 100755 --- a/contrib/bmake/configure +++ b/contrib/bmake/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for bmake 20240711. +# Generated by GNU Autoconf 2.72 for bmake 20251111. # # Report bugs to <sjg@NetBSD.org>. # @@ -603,8 +603,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bmake' PACKAGE_TARNAME='bmake' -PACKAGE_VERSION='20240711' -PACKAGE_STRING='bmake 20240711' +PACKAGE_VERSION='20251111' +PACKAGE_STRING='bmake 20251111' PACKAGE_BUGREPORT='sjg@NetBSD.org' PACKAGE_URL='' @@ -644,6 +644,7 @@ ac_func_c_list= ac_subst_vars='LTLIBOBJS UTC_1 _MAKE_VERSION +lua filemon_h use_filemon use_meta @@ -720,6 +721,7 @@ with_makefile with_meta with_filemon with_bmake_strftime +with_lua with_machine with_force_machine with_force_machine_arch @@ -1286,7 +1288,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures bmake 20240711 to adapt to many kinds of systems. +'configure' configures bmake 20251111 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1348,7 +1350,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bmake 20240711:";; + short | recursive ) echo "Configuration of bmake 20251111:";; esac cat <<\_ACEOF @@ -1371,6 +1373,7 @@ Optional Packages: --without-meta disable use of meta-mode --with-filemon={no,dev,ktrace,path/filemon.h} indicate filemon method for meta-mode. Path to filemon.h implies dev --with-bmake-strftime force use of bmake strftime + --without-lua do not use check-expect.lua --with-machine=MACHINE explicitly set MACHINE --with-force-machine=MACHINE set FORCE_MACHINE --with-force-machine-arch=MACHINE set FORCE_MACHINE_ARCH @@ -1458,7 +1461,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bmake configure 20240711 +bmake configure 20251111 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1981,7 +1984,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bmake $as_me 20240711, which was +It was created by bmake $as_me 20251111, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2772,6 +2775,13 @@ esac . $srcdir/VERSION OS=`uname -s` +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + use_defshell() { case "$defshell_path$DEFSHELL_INDEX" in "") ;; @@ -2867,6 +2877,7 @@ esac else case e in #( e) case "$OS" in +Cygwin*|MINGW*) use_filemon=no;; NetBSD) filemon_h=no use_filemon=ktrace;; *) for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" @@ -2943,6 +2954,29 @@ do PATH=$PATH:$d done export PATH +lua=$LUA + +# Check whether --with-lua was given. +if test ${with_lua+y} +then : + withval=$with_lua; case "${withval}" in +no) lua=:;; +yes) lua= ;; +/*lua*) lua=$withval;; +*) as_fn_error $? "bad value ${withval} given for lua" "$LINENO" 5;; +esac +fi + +if test "x$lua" != x:; then + if have lua; then + lua_version=`${lua:-lua} -v | sed 's/Lua //;s/ *Copy.*//;'` + echo $ECHO_N "checking whether lua version ($lua_version) > 5.2... $ECHO_C" >&6 + case "$lua_version" in + 4.*|5.1.*) lua=:; echo no >&6;; + *) echo yes >&6;; + esac + fi +fi @@ -7277,6 +7311,7 @@ esac + bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" if test $use_makefile = yes; then bm_outfiles="makefile $bm_outfiles" @@ -7798,7 +7833,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bmake $as_me 20240711, which was +This file was extended by bmake $as_me 20251111, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7862,7 +7897,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -bmake config.status 20240711 +bmake config.status 20251111 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/contrib/bmake/configure.in b/contrib/bmake/configure.in index 294246dea60d..f378b57fd14a 100644 --- a/contrib/bmake/configure.in +++ b/contrib/bmake/configure.in @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.108 2024/07/13 15:27:00 sjg Exp $ +dnl $Id: configure.in,v 1.111 2025/11/11 18:43:59 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ([2.71]) -AC_INIT([bmake],[20240711],[sjg@NetBSD.org]) +AC_INIT([bmake],[20251111],[sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -18,6 +18,14 @@ dnl get _MAKE_VERSION . $srcdir/VERSION OS=`uname -s` +dnl do not trust return from type +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + dnl function to set DEFSHELL_INDEX use_defshell() { case "$defshell_path$DEFSHELL_INDEX" in @@ -107,6 +115,7 @@ esac ], [ case "$OS" in +Cygwin*|MINGW*) use_filemon=no;; NetBSD) filemon_h=no use_filemon=ktrace;; *) for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" @@ -187,6 +196,28 @@ do PATH=$PATH:$d done export PATH +dnl +dnl if lua is available check it is version 5.2 or later +lua=$LUA +AC_ARG_WITH(lua, +[ --without-lua do not use check-expect.lua], +[case "${withval}" in +no) lua=:;; +yes) lua= ;; +/*lua*) lua=$withval;; +*) AC_MSG_ERROR(bad value ${withval} given for lua);; +esac]) +if test "x$lua" != x:; then + if have lua; then + lua_version=`${lua:-lua} -v | sed 's/Lua //;s/ *Copy.*//;'` + echo $ECHO_N "checking whether lua version ($lua_version) > 5.2... $ECHO_C" >&6 + case "$lua_version" in + 4.*|5.1.*) lua=:; echo no >&6;; + *) echo yes >&6;; + esac + fi +fi +dnl dnl Solaris's signal.h only privides sigset_t etc if one of dnl _EXTENSIONS_ _POSIX_C_SOURCE or _XOPEN_SOURCE are defined. dnl The later two seem to cause more problems than they solve so if we @@ -580,6 +611,7 @@ AC_SUBST(diff_u) AC_SUBST(use_meta) AC_SUBST(use_filemon) AC_SUBST(filemon_h) +AC_SUBST(lua) AC_SUBST(_MAKE_VERSION) AC_SUBST(UTC_1) bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" diff --git a/contrib/bmake/install-sh b/contrib/bmake/install-sh index aa35fa94c83a..14ddc8ccd13a 100755 --- a/contrib/bmake/install-sh +++ b/contrib/bmake/install-sh @@ -53,19 +53,12 @@ # Simon J. Gerraty <sjg@crufty.net> # -# SPDX-License-Identifier: BSD-2-Clause -# # RCSid: -# $Id: install-sh,v 1.26 2024/02/17 17:26:57 sjg Exp $ +# $Id: install-sh,v 1.27 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1993-2023 Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index a773b44f42c4..24a1caef4291 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.661 2025/07/06 07:11:31 rillig Exp $ */ +/* $NetBSD: main.c,v 1.662 2025/08/09 23:13:28 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.661 2025/07/06 07:11:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.662 2025/08/09 23:13:28 rillig Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -390,8 +390,8 @@ MainParseArgJobsInternal(const char *argvalue) progname, argvalue, curdir); exit(2); } - if ((fcntl(tokenPoolReader, F_GETFD, 0) < 0) || - (fcntl(tokenPoolWriter, F_GETFD, 0) < 0)) { + if (fcntl(tokenPoolReader, F_GETFD, 0) < 0 || + fcntl(tokenPoolWriter, F_GETFD, 0) < 0) { tokenPoolReader = -1; tokenPoolWriter = -1; bogusJflag = true; @@ -601,7 +601,7 @@ MainParseArgs(int argc, char **argv) bool inOption, dashDash = false; const char *optspecs = "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstv:w"; -/* Can't actually use getopt(3) because rescanning is not portable */ + /* Can't actually use getopt(3) because rescanning is not portable */ rearg: inOption = false; @@ -1709,7 +1709,7 @@ ReadMakefile(const char *fname) * placement of the setting here means it gets set to the last * makefile specified, as it is set by SysV make. */ -found: + found: if (!doing_depend) Var_Set(SCOPE_INTERNAL, "MAKEFILE", fname); Parse_File(fname, fd); @@ -1802,7 +1802,6 @@ Cmd_Exec(const char *cmd, char **error) (void)execv(shellPath, UNCONST(args)); _exit(1); - /* NOTREACHED */ case -1: *error = str_concat3("Couldn't exec \"", cmd, "\""); diff --git a/contrib/bmake/make.1 b/contrib/bmake/make.1 index de67759290c4..1a99b50d5e89 100644 --- a/contrib/bmake/make.1 +++ b/contrib/bmake/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ +.\" $NetBSD: make.1,v 1.388 2025/11/12 22:14:07 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 2, 2025 +.Dd November 11, 2025 .Dt MAKE 1 .Os .Sh NAME @@ -956,6 +956,11 @@ include additional unexpanded variable references) are shown. .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va MAKE_VERSION +This variable indicates the version of +.Nm . +It is typically the date of last import from NetBSD. +It is useful for checking whether certain features are available. .It Va MAKEFILE The top-level makefile that is currently read, as given in the command line. @@ -1892,6 +1897,10 @@ The output of running is the value. .It Cm \&:sh The value is run as a command, and the output becomes the new value. +.It Cm \&:sh1 +The value is run as a command, for the first reference only, and +the output is cached for subsequent references. +This modifier is useful when the result is not expected to change. .It Cm \&::= Ns Ar str The variable is assigned the value .Ar str diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index fda6d8b02158..daacc97ec045 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,52 @@ +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 + 2025-07-24 Simon J Gerraty <sjg@beast.crufty.net> * install-mk (MK_VERSION): 20250724 diff --git a/contrib/bmake/mk/auto.dep.mk b/contrib/bmake/mk/auto.dep.mk index 400789a37366..ffd0d528dbcb 100644 --- a/contrib/bmake/mk/auto.dep.mk +++ b/contrib/bmake/mk/auto.dep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: auto.dep.mk,v 1.12 2024/02/17 17:26:57 sjg Exp $ +# $Id: auto.dep.mk,v 1.13 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2010-2021, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/auto.obj.mk b/contrib/bmake/mk/auto.obj.mk index 4b8c5325b71f..140764860de3 100644 --- a/contrib/bmake/mk/auto.obj.mk +++ b/contrib/bmake/mk/auto.obj.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: auto.obj.mk,v 1.20 2025/05/17 15:29:55 sjg Exp $ +# $Id: auto.obj.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2004-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/autoconf.mk b/contrib/bmake/mk/autoconf.mk index 24532c4e9eab..26e9515d680c 100644 --- a/contrib/bmake/mk/autoconf.mk +++ b/contrib/bmake/mk/autoconf.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: autoconf.mk,v 1.20 2024/02/17 17:26:57 sjg Exp $ +# $Id: autoconf.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1996-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/autodep.mk b/contrib/bmake/mk/autodep.mk index 88a2643bccff..ab04419ba808 100644 --- a/contrib/bmake/mk/autodep.mk +++ b/contrib/bmake/mk/autodep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: autodep.mk,v 1.43 2024/02/17 17:26:57 sjg Exp $ +# $Id: autodep.mk,v 1.44 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1999-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/cc-wrap.mk b/contrib/bmake/mk/cc-wrap.mk index 7c1d6165e9df..f8287c30025e 100644 --- a/contrib/bmake/mk/cc-wrap.mk +++ b/contrib/bmake/mk/cc-wrap.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: cc-wrap.mk,v 1.7 2024/02/17 17:26:57 sjg Exp $ +# $Id: cc-wrap.mk,v 1.8 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/ccm.dep.mk b/contrib/bmake/mk/ccm.dep.mk index 1809a72e7310..1b31832b8ea9 100644 --- a/contrib/bmake/mk/ccm.dep.mk +++ b/contrib/bmake/mk/ccm.dep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: ccm.dep.mk,v 1.3 2024/02/17 17:26:57 sjg Exp $ +# $Id: ccm.dep.mk,v 1.4 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/compiler.mk b/contrib/bmake/mk/compiler.mk index e7a13f0f11d7..32bf55834d03 100644 --- a/contrib/bmake/mk/compiler.mk +++ b/contrib/bmake/mk/compiler.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: compiler.mk,v 1.14 2024/02/19 00:05:50 sjg Exp $ +# $Id: compiler.mk,v 1.15 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2019, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/cython.mk b/contrib/bmake/mk/cython.mk index 8eda318e187c..d6ef8de0b3d6 100644 --- a/contrib/bmake/mk/cython.mk +++ b/contrib/bmake/mk/cython.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: cython.mk,v 1.10 2024/09/20 06:16:41 sjg Exp $ +# $Id: cython.mk,v 1.11 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2014-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-cache-update.mk b/contrib/bmake/mk/dirdeps-cache-update.mk index 9e7cb8281110..b046b0c04f3f 100644 --- a/contrib/bmake/mk/dirdeps-cache-update.mk +++ b/contrib/bmake/mk/dirdeps-cache-update.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-cache-update.mk,v 1.23 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-cache-update.mk,v 1.24 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2020, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-options.mk b/contrib/bmake/mk/dirdeps-options.mk index e12dcec40ac7..d173cb7d1e97 100644 --- a/contrib/bmake/mk/dirdeps-options.mk +++ b/contrib/bmake/mk/dirdeps-options.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-options.mk,v 1.22 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-options.mk,v 1.23 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2018-2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-targets.mk b/contrib/bmake/mk/dirdeps-targets.mk index a8a547c0ce9b..1d00c5f418d2 100644 --- a/contrib/bmake/mk/dirdeps-targets.mk +++ b/contrib/bmake/mk/dirdeps-targets.mk @@ -1,19 +1,11 @@ -# SPDX-License-Identifier: BSD-2-Clause +# $Id: dirdeps-targets.mk,v 1.29 2025/08/09 22:42:24 sjg Exp $ # -# RCSid: -# $Id: dirdeps-targets.mk,v 1.28 2024/10/19 00:47:38 sjg Exp $ +# @(#) Copyright (c) 2019-2020 Simon J. Gerraty # -# @(#) Copyright (c) 2019-2020 Simon J. Gerraty +# SPDX-License-Identifier: BSD-2-Clause # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are *** 2066 LINES SKIPPED ***home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6962c5d4.26529.59af9453>
