Module Name: src
Committed By: rillig
Date: Thu Nov 12 00:40:55 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: varmod-defined.mk varmod-loop.exp
varmod-loop.mk
Log Message:
make(1): fix tests varmod-defined and varmod-loop regarding dollars
Some derived versions of NetBSD's make set .MAKE.SAVE_DOLLARS to no. In
these versions, running the tests would fail. Therefore better set
.MAKE.SAVE_DOLLARS to yes explicitly as far as necessary.
Suggested by sjg.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-defined.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-loop.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/varmod-defined.mk
diff -u src/usr.bin/make/unit-tests/varmod-defined.mk:1.8 src/usr.bin/make/unit-tests/varmod-defined.mk:1.9
--- src/usr.bin/make/unit-tests/varmod-defined.mk:1.8 Sun Nov 8 20:29:13 2020
+++ src/usr.bin/make/unit-tests/varmod-defined.mk Thu Nov 12 00:40:55 2020
@@ -1,8 +1,10 @@
-# $NetBSD: varmod-defined.mk,v 1.8 2020/11/08 20:29:13 rillig Exp $
+# $NetBSD: varmod-defined.mk,v 1.9 2020/11/12 00:40:55 rillig Exp $
#
# Tests for the :D variable modifier, which returns the given string
# if the variable is defined. It is closely related to the :U modifier.
+.MAKE.SAVE_DOLLARS= yes
+
DEF= defined
.undef UNDEF
Index: src/usr.bin/make/unit-tests/varmod-loop.exp
diff -u src/usr.bin/make/unit-tests/varmod-loop.exp:1.4 src/usr.bin/make/unit-tests/varmod-loop.exp:1.5
--- src/usr.bin/make/unit-tests/varmod-loop.exp:1.4 Sun Nov 8 18:05:32 2020
+++ src/usr.bin/make/unit-tests/varmod-loop.exp Thu Nov 12 00:40:55 2020
@@ -1,10 +1,10 @@
-ParseReadLine (115): 'USE_8_DOLLARS= ${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} $$$$$$$$'
+ParseReadLine (117): 'USE_8_DOLLARS= ${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} $$$$$$$$'
CondParser_Eval: ${USE_8_DOLLARS} != "\$\$\$\$ \$\$\$\$ \$\$\$\$"
lhs = "$$$$ $$$$ $$$$", rhs = "$$$$ $$$$ $$$$", op = !=
-ParseReadLine (120): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}'
+ParseReadLine (122): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}'
CondParser_Eval: ${SUBST_CONTAINING_LOOP} != "\$\$ \$\$\$\$ \$\$\$\$"
lhs = "$$ $$$$ $$$$", rhs = "$$ $$$$ $$$$", op = !=
-ParseReadLine (145): '.MAKEFLAGS: -d0'
+ParseReadLine (147): '.MAKEFLAGS: -d0'
ParseDoDependency(.MAKEFLAGS: -d0)
:+one+ +two+ +three+:
:x1y x2y x3y:
Index: src/usr.bin/make/unit-tests/varmod-loop.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop.mk:1.7 src/usr.bin/make/unit-tests/varmod-loop.mk:1.8
--- src/usr.bin/make/unit-tests/varmod-loop.mk:1.7 Sun Nov 8 18:05:32 2020
+++ src/usr.bin/make/unit-tests/varmod-loop.mk Thu Nov 12 00:40:55 2020
@@ -1,7 +1,9 @@
-# $NetBSD: varmod-loop.mk,v 1.7 2020/11/08 18:05:32 rillig Exp $
+# $NetBSD: varmod-loop.mk,v 1.8 2020/11/12 00:40:55 rillig Exp $
#
# Tests for the :@var@...${var}...@ variable modifier.
+.MAKE.SAVE_DOLLARS= yes
+
all: mod-loop-varname
all: mod-loop-resolve
all: mod-loop-varname-dollar