Module Name:    src
Committed By:   rillig
Date:           Sat Aug 22 21:02:56 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: varname-empty.mk

Log Message:
make(1): try a bit harder to set the variable with the empty name

There is not only the != assignment operator, but a few others as well.
Especially the += operator is interesting since it has a different code
path.  But all is good.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varname-empty.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/varname-empty.mk
diff -u src/usr.bin/make/unit-tests/varname-empty.mk:1.2 src/usr.bin/make/unit-tests/varname-empty.mk:1.3
--- src/usr.bin/make/unit-tests/varname-empty.mk:1.2	Sat Aug 22 20:31:50 2020
+++ src/usr.bin/make/unit-tests/varname-empty.mk	Sat Aug 22 21:02:56 2020
@@ -1,4 +1,4 @@
-# $NetBSD: varname-empty.mk,v 1.2 2020/08/22 20:31:50 rillig Exp $
+# $NetBSD: varname-empty.mk,v 1.3 2020/08/22 21:02:56 rillig Exp $
 #
 # Tests for the special variable with the empty name.
 #
@@ -8,6 +8,10 @@
 
 # Until 2020-08-22 it was possible to assign a value to the variable with
 # the empty name, leading to all kinds of unexpected effects.
+?=	default
+#=	assigned	# XXX: probably undefined behavior
++=	appended
+:=	subst
 !=	echo 'value'
 
 # The .for loop expands the expression ${i} to ${:U1}, ${:U2} and so on.

Reply via email to