Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): fix tests varmod-defined an...



details:   https://anonhg.NetBSD.org/src/rev/1c88da18652a
branches:  trunk
changeset: 978178:1c88da18652a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Nov 12 00:40:55 2020 +0000

description:
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.

diffstat:

 usr.bin/make/unit-tests/varmod-defined.mk |  4 +++-
 usr.bin/make/unit-tests/varmod-loop.exp   |  6 +++---
 usr.bin/make/unit-tests/varmod-loop.mk    |  4 +++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r 3afc09d5a6e5 -r 1c88da18652a usr.bin/make/unit-tests/varmod-defined.mk
--- a/usr.bin/make/unit-tests/varmod-defined.mk Thu Nov 12 00:37:51 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-defined.mk Thu Nov 12 00:40:55 2020 +0000
@@ -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
 
diff -r 3afc09d5a6e5 -r 1c88da18652a usr.bin/make/unit-tests/varmod-loop.exp
--- a/usr.bin/make/unit-tests/varmod-loop.exp   Thu Nov 12 00:37:51 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-loop.exp   Thu Nov 12 00:40:55 2020 +0000
@@ -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:
diff -r 3afc09d5a6e5 -r 1c88da18652a usr.bin/make/unit-tests/varmod-loop.mk
--- a/usr.bin/make/unit-tests/varmod-loop.mk    Thu Nov 12 00:37:51 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-loop.mk    Thu Nov 12 00:40:55 2020 +0000
@@ -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



Home | Main Index | Thread Index | Old Index