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): try a bit harder to set the...
details: https://anonhg.NetBSD.org/src/rev/3b93f98169b4
branches: trunk
changeset: 937640:3b93f98169b4
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 22 21:02:56 2020 +0000
description:
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.
diffstat:
usr.bin/make/unit-tests/varname-empty.mk | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 62d04320b786 -r 3b93f98169b4 usr.bin/make/unit-tests/varname-empty.mk
--- a/usr.bin/make/unit-tests/varname-empty.mk Sat Aug 22 20:50:43 2020 +0000
+++ b/usr.bin/make/unit-tests/varname-empty.mk Sat Aug 22 21:02:56 2020 +0000
@@ -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.
Home |
Main Index |
Thread Index |
Old Index