git: 548bfc56eb0b - main - Merge bmake-20240430
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 May 2024 22:49:47 UTC
The branch main has been updated by sjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=548bfc56eb0b2cefa0fb8dc2478240bfef610309
commit 548bfc56eb0b2cefa0fb8dc2478240bfef610309
Merge: 6faf65670edd 507951f55039
Author: Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2024-05-03 22:45:05 +0000
Commit: Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2024-05-03 22:48:32 +0000
Merge bmake-20240430
Merge commit '507951f55039f9d1ceae507d510f8cb68225fbc5'
contrib/bmake/ChangeLog | 75 +-
contrib/bmake/Makefile | 6 +-
contrib/bmake/Makefile.config.in | 1 +
contrib/bmake/VERSION | 2 +-
contrib/bmake/arch.c | 250 +-
contrib/bmake/bmake.cat1 | 2585 +++++++++++++-------
contrib/bmake/buf.c | 31 +-
contrib/bmake/buf.h | 3 +-
contrib/bmake/compat.c | 6 +-
contrib/bmake/cond.c | 19 +-
contrib/bmake/configure | 40 +-
contrib/bmake/configure.in | 25 +-
contrib/bmake/for.c | 15 +-
contrib/bmake/job.c | 11 +-
contrib/bmake/lst.c | 8 +-
contrib/bmake/lst.h | 11 +-
contrib/bmake/main.c | 18 +-
contrib/bmake/make-bootstrap.sh.in | 1 +
contrib/bmake/make.h | 22 +-
contrib/bmake/meta.c | 4 +-
contrib/bmake/mk/ChangeLog | 36 +
contrib/bmake/mk/FILES | 1 +
contrib/bmake/mk/init.mk | 4 +-
contrib/bmake/mk/install-mk | 6 +-
contrib/bmake/mk/meta.autodep.mk | 4 +-
contrib/bmake/mk/meta.subdir.mk | 3 +-
contrib/bmake/mk/own.mk | 5 +-
contrib/bmake/mk/progs.mk | 22 +-
contrib/bmake/mk/subdir.mk | 6 +-
contrib/bmake/mk/sys.dirdeps.mk | 15 +-
contrib/bmake/mk/sys/Cygwin.mk | 21 +
contrib/bmake/os.sh | 6 +-
contrib/bmake/parse.c | 26 +-
contrib/bmake/str.c | 30 +-
contrib/bmake/targ.c | 17 +-
contrib/bmake/unit-tests/Makefile | 27 +-
contrib/bmake/unit-tests/archive.exp | 8 +
contrib/bmake/unit-tests/archive.mk | 33 +-
contrib/bmake/unit-tests/cmd-errors-jobs.exp | 6 +-
contrib/bmake/unit-tests/cmd-errors-jobs.mk | 31 +-
contrib/bmake/unit-tests/cmd-errors-lint.exp | 6 +-
contrib/bmake/unit-tests/cmd-errors-lint.mk | 11 +-
contrib/bmake/unit-tests/cmd-errors.exp | 6 +-
contrib/bmake/unit-tests/cmd-errors.mk | 11 +-
contrib/bmake/unit-tests/cmdline-undefined.mk | 4 +-
contrib/bmake/unit-tests/cmdline.mk | 4 +-
contrib/bmake/unit-tests/comment.mk | 8 +-
contrib/bmake/unit-tests/cond-cmp-string.mk | 20 +-
contrib/bmake/unit-tests/cond-func-defined.exp | 3 -
contrib/bmake/unit-tests/cond-func-defined.mk | 11 +-
contrib/bmake/unit-tests/cond-token-string.exp | 2 +-
contrib/bmake/unit-tests/cond-token-string.mk | 4 +-
contrib/bmake/unit-tests/depsrc-end.mk | 4 +-
contrib/bmake/unit-tests/depsrc-nopath.exp | 2 +
contrib/bmake/unit-tests/depsrc-nopath.mk | 25 +-
contrib/bmake/unit-tests/depsrc-phony.mk | 3 +-
contrib/bmake/unit-tests/deptgt-phony.exp | 2 +-
contrib/bmake/unit-tests/deptgt.exp | 2 +-
contrib/bmake/unit-tests/deptgt.mk | 4 +-
contrib/bmake/unit-tests/directive-export-impl.exp | 2 +
contrib/bmake/unit-tests/directive-for-errors.exp | 2 +-
contrib/bmake/unit-tests/directive-for-errors.mk | 4 +-
contrib/bmake/unit-tests/directive-for-escape.exp | 1 +
contrib/bmake/unit-tests/directive-for-null.exp | 6 +-
contrib/bmake/unit-tests/directive-for-null.mk | 14 +-
contrib/bmake/unit-tests/directive-for.exp | 2 +-
contrib/bmake/unit-tests/directive-for.mk | 4 +-
contrib/bmake/unit-tests/directive-include.exp | 2 +-
contrib/bmake/unit-tests/directive-include.mk | 4 +-
contrib/bmake/unit-tests/directive-undef.exp | 2 +-
contrib/bmake/unit-tests/directive-undef.mk | 4 +-
contrib/bmake/unit-tests/lint.exp | 2 +-
contrib/bmake/unit-tests/moderrs.exp | 12 +-
contrib/bmake/unit-tests/opt-chdir.exp | 2 -
contrib/bmake/unit-tests/opt-chdir.mk | 8 +-
contrib/bmake/unit-tests/opt-debug-errors-jobs.exp | 6 +
contrib/bmake/unit-tests/opt-debug-lint.exp | 6 +-
contrib/bmake/unit-tests/opt-debug-lint.mk | 8 +-
contrib/bmake/unit-tests/opt-debug-parse.exp | 2 +
contrib/bmake/unit-tests/opt-file.exp | 4 +-
contrib/bmake/unit-tests/opt-file.mk | 12 +-
.../bmake/unit-tests/opt-keep-going-indirect.mk | 10 +-
contrib/bmake/unit-tests/opt-m-include-dir.mk | 8 +-
contrib/bmake/unit-tests/var-eval-short.exp | 4 +-
contrib/bmake/unit-tests/var-eval-short.mk | 4 +-
contrib/bmake/unit-tests/var-op-expand.exp | 4 +-
contrib/bmake/unit-tests/var-op-expand.mk | 6 +-
contrib/bmake/unit-tests/vardebug.exp | 2 +-
contrib/bmake/unit-tests/vardebug.mk | 4 +-
contrib/bmake/unit-tests/varmisc.exp | 20 +-
contrib/bmake/unit-tests/varmod-assign.exp | 2 +-
contrib/bmake/unit-tests/varmod-assign.mk | 4 +-
contrib/bmake/unit-tests/varmod-edge.exp | 6 +-
contrib/bmake/unit-tests/varmod-edge.mk | 8 +-
contrib/bmake/unit-tests/varmod-gmtime.exp | 10 +-
contrib/bmake/unit-tests/varmod-gmtime.mk | 12 +-
contrib/bmake/unit-tests/varmod-hash.exp | 6 +-
contrib/bmake/unit-tests/varmod-ifelse.exp | 2 +-
contrib/bmake/unit-tests/varmod-ifelse.mk | 6 +-
contrib/bmake/unit-tests/varmod-indirect.exp | 8 +-
contrib/bmake/unit-tests/varmod-indirect.mk | 10 +-
contrib/bmake/unit-tests/varmod-localtime.exp | 10 +-
contrib/bmake/unit-tests/varmod-localtime.mk | 12 +-
contrib/bmake/unit-tests/varmod-loop-delete.exp | 2 +-
contrib/bmake/unit-tests/varmod-loop-delete.mk | 4 +-
contrib/bmake/unit-tests/varmod-loop-varname.exp | 8 +-
contrib/bmake/unit-tests/varmod-loop-varname.mk | 10 +-
contrib/bmake/unit-tests/varmod-loop.exp | 2 +
contrib/bmake/unit-tests/varmod-match-escape.exp | 6 +-
contrib/bmake/unit-tests/varmod-match-escape.mk | 8 +-
contrib/bmake/unit-tests/varmod-match.exp | 22 +-
contrib/bmake/unit-tests/varmod-match.mk | 54 +-
contrib/bmake/unit-tests/varmod-mtime.exp | 12 +-
contrib/bmake/unit-tests/varmod-mtime.mk | 14 +-
contrib/bmake/unit-tests/varmod-range.exp | 10 +-
contrib/bmake/unit-tests/varmod-range.mk | 12 +-
contrib/bmake/unit-tests/varmod-subst-regex.exp | 2 +-
contrib/bmake/unit-tests/varmod-subst.exp | 2 +-
contrib/bmake/unit-tests/varmod-to-separator.exp | 6 +-
contrib/bmake/unit-tests/varmod-to-separator.mk | 8 +-
contrib/bmake/unit-tests/varmod.exp | 4 +-
contrib/bmake/unit-tests/varmod.mk | 6 +-
contrib/bmake/unit-tests/varname-dot-shell.exp | 3 +
contrib/bmake/unit-tests/varparse-errors.exp | 4 +-
contrib/bmake/unit-tests/varparse-errors.mk | 6 +-
contrib/bmake/var.c | 159 +-
usr.bin/bmake/Makefile | 4 +-
usr.bin/bmake/Makefile.config | 3 +-
usr.bin/bmake/config.h | 4 +-
usr.bin/bmake/unit-tests/Makefile | 27 +-
130 files changed, 2625 insertions(+), 1616 deletions(-)
diff --cc contrib/bmake/Makefile
index 3332dcdeaf2d,000000000000..65730df7e3df
mode 100644,000000..100644
--- a/contrib/bmake/Makefile
+++ b/contrib/bmake/Makefile
@@@ -1,237 -1,0 +1,237 @@@
- # $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $
++# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $
+
+PROG= bmake
+
+SRCS= \
+ arch.c \
+ buf.c \
+ compat.c \
+ cond.c \
+ dir.c \
+ for.c \
+ hash.c \
+ job.c \
+ lst.c \
+ main.c \
+ make.c \
+ make_malloc.c \
+ meta.c \
+ metachar.c \
+ parse.c \
+ str.c \
+ suff.c \
+ targ.c \
+ trace.c \
+ util.c \
+ var.c
+
+.-include "VERSION"
+.-include "Makefile.inc"
+
+# this file gets generated by configure
+.-include "Makefile.config"
+
+.if !empty(LIBOBJS)
+SRCS+= ${LIBOBJS:T:.o=.c}
+.endif
+
+# just in case
+prefix?= /usr
+srcdir?= ${.CURDIR}
+
+DEFAULT_SYS_PATH?= ${prefix}/share/mk
+
+CPPFLAGS+= -DUSE_META
+CFLAGS+= ${CPPFLAGS}
+CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
+CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
+CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
+COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
+
- .for x in FORCE_MACHINE FORCE_MACHINE_ARCH
++.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH
+.ifdef $x
+COPTS.main.c+= "-D$x=\"${$x}\""
+.endif
+.endfor
+
+# meta mode can be useful even without filemon
+# should be set by now
+USE_FILEMON ?= no
+.if ${USE_FILEMON:tl} != "no"
+.PATH: ${srcdir}/filemon
+SRCS+= filemon_${USE_FILEMON}.c
+COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu}
+COPTS.job.c+= ${COPTS.meta.c}
+
+.if ${USE_FILEMON} == "dev"
+FILEMON_H ?= /usr/include/dev/filemon/filemon.h
+.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
+COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
+.endif
+.elif ${USE_FILEMON} == "ktrace"
+COPTS.filemon_ktrace.c += -Wno-error=unused-parameter
+.endif
+
+.endif # USE_FILEMON
+
+.PATH: ${srcdir}
+
+.if make(obj) || make(clean)
+SUBDIR+= unit-tests
+.endif
+
+# start-delete1 for bsd.after-import.mk
+# we skip a lot of this when building as part of FreeBSD etc.
+
+# list of OS's which are derrived from BSD4.4
+BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig
+# we are...
+OS := ${.MAKE.OS:U${uname -s:L:sh}}
+# are we 4.4BSD ?
+isBSD44:=${BSD44_LIST:M${OS}}
+
- .if ${isBSD44} == "" && ${OS:NCYGWIN*:NDarwin:NLinux} != ""
++.if ${isBSD44} == "" && ${OS:NCygwin:NDarwin:NLinux} != ""
+MANTARGET?= cat
+.if ${MACHINE} == "sun386"
+# even I don't have one of these anymore :-)
+CFLAGS+= -DPORTAR
+.elif ${OS} != "SunOS"
+# assume the worst
+SRCS+= sigcompat.c
+CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART
+.endif
+.else
+MANTARGET?= man
+.endif
+
+# turn this on by default - ignored if we are root
+WITH_INSTALL_AS_USER=
+
+# suppress with -DWITHOUT_*
+OPTIONS_DEFAULT_YES+= \
+ AUTOCONF_MK \
+ INSTALL_MK \
+ PROG_LINK
+
+OPTIONS_DEFAULT_NO+= \
+ PROG_VERSION
+
+# process options now
+.include <own.mk>
+
+.if ${MK_PROG_VERSION} == "yes"
+PROG_NAME= ${PROG}-${_MAKE_VERSION}
+.if ${MK_PROG_LINK} == "yes"
+SYMLINKS+= ${PROG_NAME} ${BINDIR}/${PROG}
+.endif
+.endif
+
+EXTRACT_MAN=no
+# end-delete1
+
+MAN= ${PROG}.1
+MAN1= ${MAN}
+
+.if ${PROG} != "make"
+CLEANFILES+= my.history
+.if make(${MAN}) || !exists(${srcdir}/${MAN})
+my.history:
+ @(echo ".Nm"; \
+ echo "is derived from NetBSD"; \
+ echo ".Xr make 1 ."; \
+ echo "It uses autoconf to facilitate portability to other platforms."; \
+ echo ".Pp") > $@
+
+.NOPATH: ${MAN}
+${MAN}: make.1 my.history
+ @echo making $@
+ @sed \
+ -e '/^.Dt/s/MAKE/${PROG:tu}/' \
+ -e 's/^.Nx/NetBSD/' \
+ -e '/^.Nm/s/make/${PROG}/' \
+ -e '/^.Sh HISTORY/rmy.history' \
+ -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@
+
+all beforeinstall: ${MAN}
+_mfromdir=.
+.endif
+.endif
+
+MANTARGET?= cat
+MANDEST?= ${MANDIR}/${MANTARGET}1
+
+.if ${MANTARGET} == "cat"
+_mfromdir=${srcdir}
+.endif
+
+.include <prog.mk>
+
+CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H
+COPTS.var.c += -Wno-cast-qual
+COPTS.job.c += -Wno-format-nonliteral
+COPTS.parse.c += -Wno-format-nonliteral
+COPTS.var.c += -Wno-format-nonliteral
+
+# Force these
+SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share}
+BINDIR= ${BINDIR.bmake:U${prefix}/bin}
+MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man}
+
+${OBJS}: config.h
+
+# start-delete2 for bsd.after-import.mk
+
+# make sure that MAKE_VERSION gets updated.
+main.o: ${srcdir}/VERSION
+
+.if ${MK_AUTOCONF_MK} == "yes"
+CONFIGURE_DEPS += ${.CURDIR}/VERSION
+# we do not need or want the generated makefile
+CONFIGURE_ARGS += --without-makefile
+AUTOCONF_GENERATED_MAKEFILE = Makefile.config
+.include <autoconf.mk>
+.endif
+SHARE_MK ?= ${SHAREDIR}/mk
+MKSRC = ${srcdir}/mk
+INSTALL ?= ${srcdir}/install-sh
+
+.if ${MK_INSTALL_MK} == "yes"
+install: install-mk
+.endif
+
+beforeinstall:
+ test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${BINDIR}
+ test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${MANDEST}
+
+install-mk:
+.if exists(${MKSRC}/install-mk)
+ test -d ${DESTDIR}${SHARE_MK} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${SHARE_MK}
+ sh ${MKSRC}/install-mk -v -m ${NONBINMODE} ${DESTDIR}${SHARE_MK}
+.else
+ @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false
+.endif
+# end-delete2
+
+# A simple unit-test driver to help catch regressions
+TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
+accept test: .NOMETA
+ cd ${.CURDIR}/unit-tests && \
+ MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}}
+
+
+.if make(test) && ${MK_AUTO_OBJ} == "yes"
+# The test target above visits unit-tests with -r -m /
+# which prevents MK_AUTO_OBJ doing its job
+# so do it here
+.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != ""
+_utobj = ${.OBJDIR}/unit-tests
+.else
+_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj}
+.endif
+utobj: .NOMETA
+ @test -d ${_utobj} && exit 0; \
+ echo "[Creating ${_utobj}...]"; \
+ umask ${OBJDIR_UMASK:U002}; \
+ mkdir -p ${_utobj}
+test: utobj
+.endif
diff --cc contrib/bmake/mk/sys/Cygwin.mk
index 000000000000,ffc479ad9ef3..ffc479ad9ef3
mode 000000,100644..100644
--- a/contrib/bmake/mk/sys/Cygwin.mk
+++ b/contrib/bmake/mk/sys/Cygwin.mk
diff --cc usr.bin/bmake/Makefile
index 5a0bf44fb0fb,000000000000..b243cd0275b6
mode 100644,000000..100644
--- a/usr.bin/bmake/Makefile
+++ b/usr.bin/bmake/Makefile
@@@ -1,180 -1,0 +1,180 @@@
+# This is a generated file, do NOT edit!
+# See contrib/bmake/bsd.after-import.mk
+#
+
+SRCTOP?= ${.CURDIR:H:H}
+
+# look here first for config.h
+CFLAGS+= -I${.CURDIR}
+
+# for after-import
+CLEANDIRS+= FreeBSD
+CLEANFILES+= bootstrap
+
- # $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $
++# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $
+
+PROG?= ${.CURDIR:T}
+
+SRCS= \
+ arch.c \
+ buf.c \
+ compat.c \
+ cond.c \
+ dir.c \
+ for.c \
+ hash.c \
+ job.c \
+ lst.c \
+ main.c \
+ make.c \
+ make_malloc.c \
+ meta.c \
+ metachar.c \
+ parse.c \
+ str.c \
+ suff.c \
+ targ.c \
+ trace.c \
+ util.c \
+ var.c
+
+.sinclude "Makefile.inc"
+
+# this file gets generated by configure
+.sinclude "Makefile.config"
+
+.if !empty(LIBOBJS)
+SRCS+= ${LIBOBJS:T:.o=.c}
+.endif
+
+# just in case
+prefix?= /usr
+srcdir?= ${.CURDIR}
+
+DEFAULT_SYS_PATH?= ${prefix}/share/mk
+
+CPPFLAGS+= -DUSE_META
+CFLAGS+= ${CPPFLAGS}
+CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
+CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
+CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
+COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
+
- .for x in FORCE_MACHINE FORCE_MACHINE_ARCH
++.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH
+.ifdef $x
+COPTS.main.c+= "-D$x=\"${$x}\""
+.endif
+.endfor
+
+# meta mode can be useful even without filemon
+# should be set by now
+USE_FILEMON ?= no
+.if ${USE_FILEMON:tl} != "no"
+.PATH: ${srcdir}/filemon
+SRCS+= filemon_${USE_FILEMON}.c
+COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu}
+COPTS.job.c+= ${COPTS.meta.c}
+
+.if ${USE_FILEMON} == "dev"
+FILEMON_H ?= /usr/include/dev/filemon/filemon.h
+.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
+COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
+.endif
+.elif ${USE_FILEMON} == "ktrace"
+COPTS.filemon_ktrace.c += -Wno-error=unused-parameter
+.endif
+
+.endif # USE_FILEMON
+
+.PATH: ${srcdir}
+
+.if make(obj) || make(clean)
+SUBDIR+= unit-tests
+.endif
+
+
+MAN= ${PROG}.1
+MAN1= ${MAN}
+
+.if ${PROG} != "make"
+CLEANFILES+= my.history
+.if make(${MAN}) || !exists(${srcdir}/${MAN})
+my.history:
+ @(echo ".Nm"; \
+ echo "is derived from NetBSD"; \
+ echo ".Xr make 1 ."; \
+ echo "It uses autoconf to facilitate portability to other platforms."; \
+ echo ".Pp") > $@
+
+.NOPATH: ${MAN}
+${MAN}: make.1 my.history
+ @echo making $@
+ @sed \
+ -e '/^.Dt/s/MAKE/${PROG:tu}/' \
+ -e 's/^.Nx/NetBSD/' \
+ -e '/^.Nm/s/make/${PROG}/' \
+ -e '/^.Sh HISTORY/rmy.history' \
+ -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@
+
+all beforeinstall: ${MAN}
+_mfromdir=.
+.endif
+.endif
+
+MANTARGET?= cat
+MANDEST?= ${MANDIR}/${MANTARGET}1
+
+.if ${MANTARGET} == "cat"
+_mfromdir=${srcdir}
+.endif
+
+.include <bsd.prog.mk>
+
+CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H
+COPTS.var.c += -Wno-cast-qual
+COPTS.job.c += -Wno-format-nonliteral
+COPTS.parse.c += -Wno-format-nonliteral
+COPTS.var.c += -Wno-format-nonliteral
+
+# Force these
+SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share}
+BINDIR= ${BINDIR.bmake:U${prefix}/bin}
+MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man}
+
+${OBJS}: config.h
+
+
+# A simple unit-test driver to help catch regressions
+TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
+accept test: .NOMETA
+ cd ${.CURDIR}/unit-tests && \
+ MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}}
+
+
+.if make(test) && ${MK_AUTO_OBJ} == "yes"
+# The test target above visits unit-tests with -r -m /
+# which prevents MK_AUTO_OBJ doing its job
+# so do it here
+.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != ""
+_utobj = ${.OBJDIR}/unit-tests
+.else
+_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj}
+.endif
+utobj: .NOMETA
+ @test -d ${_utobj} && exit 0; \
+ echo "[Creating ${_utobj}...]"; \
+ umask ${OBJDIR_UMASK:U002}; \
+ mkdir -p ${_utobj}
+test: utobj
+.endif
+
+# override some simple things
+BINDIR= /usr/bin
+MANDIR= /usr/share/man/man
+
+# make sure we get this
+CFLAGS+= ${COPTS.${.IMPSRC:T}}
+
+after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk
+ cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk
+
diff --cc usr.bin/bmake/Makefile.config
index 88ec643b8a4a,000000000000..ee717d952846
mode 100644,000000..100644
--- a/usr.bin/bmake/Makefile.config
+++ b/usr.bin/bmake/Makefile.config
@@@ -1,27 -1,0 +1,28 @@@
+# This is a generated file, do NOT edit!
+# See contrib/bmake/bsd.after-import.mk
+#
+
+SRCTOP?= ${.CURDIR:H:H}
+
+# things set by configure
+
- _MAKE_VERSION?=20240309
++_MAKE_VERSION?=20240430
+
+prefix?= /usr
+srcdir= ${SRCTOP}/contrib/bmake
+CC?= cc
++MAKE_OS?=
+DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk
+
+EGREP = egrep
+CPPFLAGS+=
+CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H
+LDFLAGS+=
+LIBOBJS+= ${LIBOBJDIR}stresep$U.o
+LDADD+=
+USE_META?= yes
+USE_FILEMON?= dev
+FILEMON_H?= /usr/include/dev/filemon/filemon.h
+BMAKE_PATH_MAX?= 1024
+# used if MAXPATHLEN not defined
+CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX}
diff --cc usr.bin/bmake/config.h
index 281e105d853d,000000000000..3ca313216962
mode 100644,000000..100644
--- a/usr.bin/bmake/config.h
+++ b/usr.bin/bmake/config.h
@@@ -1,448 -1,0 +1,448 @@@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Path of default shell */
+/* #undef DEFSHELL_CUSTOM */
+
+/* Shell spec to use by default */
+/* #undef DEFSHELL_INDEX */
+
+/* Path of default shell */
+/* #undef DEFSHELL_PATH */
+
+/* Define to 1 if you have the <ar.h> header file. */
+#define HAVE_AR_H 1
+
+/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
+ don't. */
+#define HAVE_DECL_SYS_SIGLIST 1
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the `dirname' function. */
+#define HAVE_DIRNAME 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the `err' function. */
+#define HAVE_ERR 1
+
+/* Define to 1 if you have the `errx' function. */
+#define HAVE_ERRX 1
+
+/* Define to 1 if you have the <err.h> header file. */
+#define HAVE_ERR_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getenv' function. */
+#define HAVE_GETENV 1
+
+/* Define to 1 if you have the `getopt' function. */
+#define HAVE_GETOPT 1
+
+/* Define to 1 if you have the `getwd' function. */
+#define HAVE_GETWD 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `killpg' function. */
+#define HAVE_KILLPG 1
+
+/* Define to 1 if you have the <libgen.h> header file. */
+#define HAVE_LIBGEN_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if the system has the type `long long int'. */
+#define HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the <minix/config.h> header file. */
+/* #undef HAVE_MINIX_CONFIG_H */
+
+/* Define to 1 if you have the `mmap' function. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#define HAVE_POLL_H 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the <ranlib.h> header file. */
+#define HAVE_RANLIB_H 1
+
+/* Define to 1 if you have the `realpath' function. */
+#define HAVE_REALPATH 1
+
+/* Define to 1 if you have the <regex.h> header file. */
+#define HAVE_REGEX_H 1
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setpgid' function. */
+#define HAVE_SETPGID 1
+
+/* Define to 1 if you have the `setrlimit' function. */
+#define HAVE_SETRLIMIT 1
+
+/* Define to 1 if you have the `setsid' function. */
+#define HAVE_SETSID 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `sigaddset' function. */
+#define HAVE_SIGADDSET 1
+
+/* Define to 1 if you have the `sigpending' function. */
+#define HAVE_SIGPENDING 1
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#define HAVE_SIGPROCMASK 1
+
+/* Define to 1 if you have the `sigsetmask' function. */
+#define HAVE_SIGSETMASK 1
+
+/* Define to 1 if you have the `sigsuspend' function. */
+#define HAVE_SIGSUSPEND 1
+
+/* Define to 1 if you have the `sigvec' function. */
+#define HAVE_SIGVEC 1
+
+/* Define to 1 if the system has the type `sig_atomic_t'. */
+#define HAVE_SIG_ATOMIC_T 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `stresep' function. */
+/* #undef HAVE_STRESEP */
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strsep' function. */
+#define HAVE_STRSEP 1
+
+/* Define to 1 if you have the `strtod' function. */
+#define HAVE_STRTOD 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the `sysctl' function. */
+#define HAVE_SYSCTL 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#define HAVE_SYS_SYSCTL_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#define HAVE_UNSETENV 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if you have the `vfork' function. */
+#define HAVE_VFORK 1
+
+/* Define to 1 if you have the <vfork.h> header file. */
+/* #undef HAVE_VFORK_H */
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if you have the `wait3' function. */
+#define HAVE_WAIT3 1
+
+/* Define to 1 if you have the `wait4' function. */
+#define HAVE_WAIT4 1
+
+/* Define to 1 if you have the `waitpid' function. */
+#define HAVE_WAITPID 1
+
+/* Define to 1 if you have the `warn' function. */
+#define HAVE_WARN 1
+
+/* Define to 1 if you have the `warnx' function. */
+#define HAVE_WARNX 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define to 1 if `fork' works. */
+#define HAVE_WORKING_FORK 1
+
+/* Define to 1 if `vfork' works. */
+#define HAVE_WORKING_VFORK 1
+
+/* define if your compiler has __attribute__ */
+#define HAVE___ATTRIBUTE__ 1
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "sjg@NetBSD.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "bmake"
+
+/* Define to the full name and version of this package. */
- #define PACKAGE_STRING "bmake 20240212"
++#define PACKAGE_STRING "bmake 20240314"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "bmake"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
- #define PACKAGE_VERSION "20240212"
++#define PACKAGE_VERSION "20240314"
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# define _DARWIN_C_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# define _HPUX_ALT_XOPEN_SOCKET_API 1
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+/* # undef _MINIX */
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# define _NETBSD_SOURCE 1
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# define _OPENBSD_SOURCE 1
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+/* # undef _POSIX_SOURCE */
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+/* # undef _POSIX_1_SOURCE */
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
*** 1001 LINES SKIPPED ***