diff options
| author | Simon J. Gerraty <sjg@FreeBSD.org> | 2026-04-06 18:29:01 +0000 |
|---|---|---|
| committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2026-04-06 18:32:43 +0000 |
| commit | 34a3834eadd03bec7703b8fbf9123f27b1114986 (patch) | |
| tree | f320e47c180435d3129bd0ce5e3ac878d359f92b /usr.bin | |
| parent | c5961b6fcfe0f3587be11187a9c666a7fa200f4b (diff) | |
| parent | fe271bdb43cf88ee129d94c0e286fe618fd28e89 (diff) | |
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/bmake/Makefile | 19 | ||||
| -rw-r--r-- | usr.bin/bmake/Makefile.config | 2 | ||||
| -rw-r--r-- | usr.bin/bmake/unit-tests/Makefile | 33 |
3 files changed, 41 insertions, 13 deletions
diff --git a/usr.bin/bmake/Makefile b/usr.bin/bmake/Makefile index a8bcdfd9f859..8d23bb8dd203 100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@ -11,7 +11,7 @@ CFLAGS+= -I${.CURDIR} CLEANDIRS+= FreeBSD CLEANFILES+= bootstrap -# $Id: Makefile,v 1.133 2025/03/08 20:12:56 sjg Exp $ +# $Id: Makefile,v 1.137 2026/03/13 15:37:22 sjg Exp $ PROG?= ${.CURDIR:T} @@ -40,9 +40,6 @@ SRCS= \ .MAIN: all -MAN= ${PROG}.1 -SRCS.${MAN}= ${srcdir}/make.1 - .-include "Makefile.inc" # this file gets generated by configure @@ -57,6 +54,9 @@ prefix?= /usr srcdir?= ${.PARSEDIR} srcdir:= ${srcdir} +MAN?= ${PROG}.1 +SRCS.${MAN}?= ${srcdir}/make.1 + DEFAULT_SYS_PATH?= ${prefix}/share/mk CPPFLAGS+= -DUSE_META @@ -66,7 +66,13 @@ 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_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH +# bmake defaults to the traditional behavior +MAKE_SAVE_DOLLARS_DEFAULT?= no + +VARS.main+= FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH \ + MAKE_SAVE_DOLLARS_DEFAULT \ + +.for x in ${VARS.main} .ifdef $x COPTS.main.c+= "-D$x=\"${$x}\"" .endif @@ -164,7 +170,8 @@ SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} BINDIR= ${BINDIR.bmake:U${prefix}/bin} MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} -${OBJS}: config.h +${OBJS}: .META config.h +${PROG}: .META # A simple unit-test driver to help catch regressions diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config index 16cce3e1658a..5ba662b3145e 100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H} # things set by configure -_MAKE_VERSION?=20251111 +_MAKE_VERSION?=20260313 prefix?= /usr srcdir= ${SRCTOP}/contrib/bmake diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile index d04a45b93247..c7ac7ee5fed1 100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@ -1,9 +1,9 @@ # This is a generated file, do NOT edit! # See contrib/bmake/bsd.after-import.mk # -# $Id: Makefile,v 1.251 2025/11/15 17:17:18 sjg Exp $ +# $Id: Makefile,v 1.260 2026/03/10 15:45:51 sjg Exp $ # -# $NetBSD: Makefile,v 1.373 2025/11/12 22:14:08 sjg Exp $ +# $NetBSD: Makefile,v 1.383 2026/03/10 15:38:26 sjg Exp $ # # Unit tests for make(1) # @@ -632,6 +632,9 @@ SED_CMDS.opt-chdir= -e 's,\(nonexistent\).[1-9][0-9]*,\1,' \ -e 's,no such,No such,' \ -e 's,Filename,File name,' +SED_CMDS.gnode-submake= ${STD_SED_CMDS.dj} +SED_CMDS.gnode-submake= ${STD_SED_CMDS.dg2} + # meta line numbers can vary based on filemon implementation SED_CMDS.meta-ignore= -e 's,\(\.meta:\)[1-9][0-9]*:,\1<line>:,' @@ -645,6 +648,7 @@ SED_CMDS.opt-debug-lint+= ${STD_SED_CMDS.regex} SED_CMDS.opt-jobs-no-action= ${STD_SED_CMDS.hide-from-output} SED_CMDS.opt-no-action-runflags= ${STD_SED_CMDS.hide-from-output} SED_CMDS.opt-where-am-i= -e '/usr.obj/d' +SED_CMDS.opt-where-am-i+= -e '/\/\//d' # For Compat_RunCommand, useShell == false. SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<not found: ...>,' # For Compat_RunCommand, useShell == true. @@ -665,6 +669,7 @@ SED_CMDS.var-op-shell+= -e '/command/s,No such.*,not found,' SED_CMDS.var-op-shell+= ${STD_SED_CMDS.white-space} SED_CMDS.vardebug+= -e 's,${.SHELL},</path/to/shell>,' SED_CMDS.varmod-mtime+= -e "s,\(mtime for .*\): .*,\1: <ENOENT>," +SED_CMDS.varmod-subst+= ${STD_SED_CMDS.regex} SED_CMDS.varmod-subst-regex+= ${STD_SED_CMDS.regex} SED_CMDS.varparse-errors+= ${STD_SED_CMDS.timestamp} SED_CMDS.varname-dot-make-meta-ignore_filter+= ${SED_CMDS.meta-ignore} @@ -680,7 +685,10 @@ SED_CMDS.varname-empty= ${.OBJDIR .PARSEDIR .PATH .SHELL .SYSPATH:L:@v@-e '/\\$ # Some tests need an additional round of postprocessing. POSTPROC.depsrc-wait= sed -e '/^---/d' -e 's,^\(: Making 3[abc]\)[123]$$,\1,' POSTPROC.deptgt-suffixes= awk '/^\#\*\*\* Suffixes/,/^never-stop/' -POSTPROC.gnode-submake= awk '/Begin input graph/, /^$$/' +POSTPROC.gnode-submake= \ + awk '/Begin input graph/, /^\# \.END/ { \ + if (/made,/) print $$0 \ + }' POSTPROC.varname-dot-make-mode= sed 's,^\(: Making [abc]\)[123]$$,\1,' # Some tests reuse other tests, which makes them unnecessarily fragile. @@ -703,6 +711,7 @@ STD_SED_CMDS.dg1= -e '/\#.* \.$$/d' STD_SED_CMDS.dg1+= -e '/\.MAKE.PATH_FILEMON/d' STD_SED_CMDS.dg1+= -e '/^\#.*\/mk/d' STD_SED_CMDS.dg1+= -e 's, ${DEFSYSPATH:U/usr/share/mk}$$, <defsyspath>,' +STD_SED_CMDS.dg1+= -e '/^\.MAKE\.PATH_FILEMON/d' STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE *=\) .*,\1 <details omitted>,' STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE\.[A-Z_]* *=\) .*,\1 <details omitted>,' STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE\.JOBS\.C *=\) .*,\1 <details omitted>,' @@ -713,6 +722,7 @@ STD_SED_CMDS.dg1+= -e '/\.SYSPATH/d' STD_SED_CMDS.dg2= ${STD_SED_CMDS.dg1} STD_SED_CMDS.dg2+= -e 's,\(last modified\) ..:..:.. ... ..\, ....,\1 <timestamp>,' + STD_SED_CMDS.dg3= ${STD_SED_CMDS.dg2} # Omit details such as process IDs from the output of the -dj option. @@ -795,6 +805,16 @@ clean: rm -f ${CLEANFILES} TEST_MAKE?= ${.MAKE} +.if ${TEST_MAKE:M/*} == "" +# we want an absolute path for TEST_MAKE +tm!= for d in ${PATH:S,:, ,g:M/*}; do \ + test -x $$d/${TEST_MAKE} || continue; \ + echo $$d/${TEST_MAKE}; break; done +.if ${tm:M/*} +TEST_MAKE:= ${tm} +.endif +.endif + TOOL_SED?= sed TOOL_TR?= tr TOOL_DIFF?= diff @@ -834,7 +854,7 @@ LIMIT_RESOURCES?= : # each other, and because they use different environment variables and # command line options. .SUFFIXES: .mk .rawout .out -.mk.rawout: +.mk.rawout: .META @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX} @set -eu; \ ${LIMIT_RESOURCES}; \ @@ -876,7 +896,8 @@ _SED_CMDS+= -e 's,^usage: ${TEST_MAKE:T:S,.,\\.,g} ,usage: make ,' _SED_CMDS+= -e 's,${TEST_MAKE:T:S,.,\\.,g}\(\[[1-9][0-9]*\][: ]\),make\1,' _SED_CMDS+= -e 's,<curdir>/,,g' _SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g' -_SED_CMDS+= -e '/MAKE_VERSION/d' +_SED_CMDS+= -e 's,\(\.make\)[1-9][0-9]*,\1,g' +_SED_CMDS+= -e '/MAKE.VERSION/d' _SED_CMDS+= -e '/EGREP=/d' # on AT&T derived systems: false exits 255 not 1 @@ -889,7 +910,7 @@ SED_CMDS.opt-debug-jobs+= -e 's,Command: ksh -v,Command: <shell>,' SED_CMDS.opt-debug-jobs+= -e 's,Command: <shell> -v,Command: <shell>,' .endif -.rawout.out: +.rawout.out: .META @${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} ${_SED_CMDS_LAST} \ < ${.IMPSRC} > ${.TARGET}.tmp @${POSTPROC.${.PREFIX:T}:D \ |
