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 tests/make: document that undefining...



details:   https://anonhg.NetBSD.org/src/rev/59245bab345a
branches:  trunk
changeset: 1026590:59245bab345a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 30 23:58:10 2021 +0000

description:
tests/make: document that undefining .MAKE.SAVE_DOLLARS has no effect

diffstat:

 usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk |  21 +++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 0982cddd3d0c -r 59245bab345a usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk
--- a/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk  Tue Nov 30 23:52:19 2021 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk  Tue Nov 30 23:58:10 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: varname-dot-make-save_dollars.mk,v 1.3 2021/11/30 23:52:19 rillig Exp $
+# $NetBSD: varname-dot-make-save_dollars.mk,v 1.4 2021/11/30 23:58:10 rillig Exp $
 #
 # Tests for the special .MAKE.SAVE_DOLLARS variable, which controls whether
 # the assignment operator ':=' converts '$$' to a single '$' or keeps it
@@ -51,9 +51,28 @@
 
 # The '$' from the ':U' expressions are indirect, therefore SAVE_DOLLARS
 # doesn't apply to them.
+.MAKE.SAVE_DOLLARS=    no
 VAR:=          ${:U\$\$\$\$}-${.MAKE.SAVE_DOLLARS::=yes}-${:U\$\$\$\$}
 .if ${VAR} != "\$\$--\$\$"
 .  error
 .endif
 
+# Undefining .MAKE.SAVE_DOLLARS does not have any effect, in particular it
+# does not restore the default behavior.
+.MAKE.SAVE_DOLLARS=    no
+.undef .MAKE.SAVE_DOLLARS
+VAR:=          $$$$$$$$
+.if ${VAR} != "\$\$"
+.  error
+.endif
+
+# Undefining .MAKE.SAVE_DOLLARS does not have any effect, in particular it
+# does not restore the default behavior.
+.MAKE.SAVE_DOLLARS=    yes
+.undef .MAKE.SAVE_DOLLARS
+VAR:=          $$$$$$$$
+.if ${VAR} != "\$\$\$\$"
+.  error
+.endif
+
 all:



Home | Main Index | Thread Index | Old Index