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): add test for empty indirect...



details:   https://anonhg.NetBSD.org/src/rev/b703e16c314b
branches:  trunk
changeset: 936680:b703e16c314b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 01 17:26:41 2020 +0000

description:
make(1): add test for empty indirect modifier

diffstat:

 usr.bin/make/unit-tests/modmisc.mk |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 9a6ff6c84120 -r b703e16c314b usr.bin/make/unit-tests/modmisc.mk
--- a/usr.bin/make/unit-tests/modmisc.mk        Sat Aug 01 17:25:57 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.mk        Sat Aug 01 17:26:41 2020 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index