Module Name: src
Committed By: rillig
Date: Sat Aug 1 17:26:41 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: modmisc.mk
Log Message:
make(1): add test for empty indirect modifier
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/make/unit-tests/modmisc.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/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.31 src/usr.bin/make/unit-tests/modmisc.mk:1.32
--- src/usr.bin/make/unit-tests/modmisc.mk:1.31 Sat Aug 1 17:20:42 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk Sat Aug 1 17:26:41 2020
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.31 2020/08/01 17:20:42 rillig Exp $
+# $Id: modmisc.mk,v 1.32 2020/08/01 17:26:41 rillig Exp $
#
# miscellaneous modifier tests
@@ -313,3 +313,12 @@ mod-range:
.if ${value:L:${:US,a,A,}:${:US,e,E,}} != "vAluE"
.warning unexpected
.endif
+
+# An indirect variable that evaluates to the empty string is allowed though.
+# This makes it possible to define conditional modifiers, like this:
+#
+# M.little-endian= S,1234,4321,
+# M.big-endian= # none
+.if ${value:L:${:Dempty}S,a,A,} != "vAlue"
+.warning unexpected
+.endif