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): explain why the dep-var tes...
details: https://anonhg.NetBSD.org/src/rev/1fe7827f5a8f
branches: trunk
changeset: 938723:1fe7827f5a8f
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Sep 13 20:04:26 2020 +0000
description:
make(1): explain why the dep-var test behaves differently in lint mode
diffstat:
usr.bin/make/unit-tests/dep-var.mk | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 7560287ce6b3 -r 1fe7827f5a8f usr.bin/make/unit-tests/dep-var.mk
--- a/usr.bin/make/unit-tests/dep-var.mk Sun Sep 13 19:46:23 2020 +0000
+++ b/usr.bin/make/unit-tests/dep-var.mk Sun Sep 13 20:04:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dep-var.mk,v 1.4 2020/09/08 05:26:22 rillig Exp $
+# $NetBSD: dep-var.mk,v 1.5 2020/09/13 20:04:26 rillig Exp $
#
# Tests for variable references in dependency declarations.
#
@@ -73,6 +73,14 @@
# would be interpreted as a dependency operator instead.
all: $$$$)
+# The $$INDIRECT in the following line is treated like the dependency of the
+# "all" target, that is, the "$$I" is first expanded to "$I", and in a second
+# round of expansion, the "$I" expands to nothing since the variable "I" is
+# undefined.
+#
+# Since 2020-09-13, this generates a parse error in lint mode (-dL), but not
+# in normal mode since ParseDoDependency does not handle any errors after
+# calling Var_Parse.
undef1 def2 a-def2-b 1-2-$$INDIRECT_2-2-1 ${:U\$)}:
@echo ${.TARGET:Q}
Home |
Main Index |
Thread Index |
Old Index