git: 2d203f534bae - stable/13 - bmake/unit-tests/Makefile use _shell
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Sep 2024 06:29:34 UTC
The branch stable/13 has been updated by sjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=2d203f534baef0568989555ebd26278134ef4c6b
commit 2d203f534baef0568989555ebd26278134ef4c6b
Author: Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2024-09-01 06:29:19 +0000
Commit: Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2024-09-01 06:29:19 +0000
bmake/unit-tests/Makefile use _shell
Set _shell like later versions of bmake so that .SHELL
does not appear in conditionals.
This avoids errors when an older version of bmake parses this makefile
such as when doing src upgrade from stable/12 or older.
Direct commit to stable/13 since this is the only branch where
this issue arrises.
PR: 281151
---
usr.bin/bmake/unit-tests/Makefile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile
index 96bde713ba38..2b20de2498eb 100644
--- a/usr.bin/bmake/unit-tests/Makefile
+++ b/usr.bin/bmake/unit-tests/Makefile
@@ -441,14 +441,15 @@ TESTS+= varparse-mod
TESTS+= varparse-undef-partial
TESTS+= varquote
-# for now at least
-.if ${.SHELL:T} == "ksh"
+# some shells have quirks
+_shell := ${.SHELL:U/bin/sh:tA:T}
+.if ${_shell} == "ksh"
BROKEN_TESTS+= sh-flags
.endif
.if ${.MAKE.OS:NDarwin} == ""
BROKEN_TESTS+= shell-ksh
.endif
-.if ${.MAKE.OS} == "Linux" && ${.SHELL:tA:T} != "bash"
+.if ${.MAKE.OS} == "Linux" && ${_shell} != "bash"
.if exists(/etc/os-release)
distro!= . /etc/os-release && echo $$NAME
.endif
@@ -465,7 +466,7 @@ BROKEN_TESTS+= \
varmod-localtime \
varmod-to-separator \
-.if ${.SHELL:T} == "bash"
+.if ${_shell} == "bash"
BROKEN_TESTS+= job-output-null
.else
BROKEN_TESTS+= \
@@ -771,7 +772,7 @@ _SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g'
.if ${.MAKE.OS:N*BSD} != ""
_SED_CMDS+= -e 's,\(Error code\) 255,\1 1,'
.endif
-.if ${.SHELL:T} == "ksh"
+.if ${_shell} == "ksh"
_SED_CMDS+= -e '/^set [+-]v/d'
.endif