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 rationale and expected ...



details:   https://anonhg.NetBSD.org/src/rev/6b6e7aed4711
branches:  trunk
changeset: 937026:6b6e7aed4711
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Aug 06 05:52:45 2020 +0000

description:
make(1): add rationale and expected behavior to "recursive" test

diffstat:

 usr.bin/make/unit-tests/recursive.mk |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 30752cce53b6 -r 6b6e7aed4711 usr.bin/make/unit-tests/recursive.mk
--- a/usr.bin/make/unit-tests/recursive.mk      Thu Aug 06 05:36:32 2020 +0000
+++ b/usr.bin/make/unit-tests/recursive.mk      Thu Aug 06 05:52:45 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: recursive.mk,v 1.1 2020/08/06 05:36:33 rillig Exp $
+# $NetBSD: recursive.mk,v 1.2 2020/08/06 05:52:45 rillig Exp $
 #
 # In -dL mode, a variable may get expanded before it makes sense.
 # This would stop make from doing anything since the "recursive" error
@@ -15,8 +15,23 @@
 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
 am__v_lt_0 = --silent
 am__v_lt_1 =
+
+# On 2020-08-06, make reported: "Variable am__v_lt_ is recursive."
 libXfixes_la_LINK = ... $(AM_V_lt) ...
-.info not reached
 
 # somewhere later ...
 AM_DEFAULT_VERBOSITY = 1
+
+
+# The purpose of the -dL flag is to detect unclosed variables.  This
+# can be achieved by just parsing the variable and not evaluating it.
+#
+# When the variable is only parsed but not evaluated, bugs in nested
+# variables are not discovered.  But these are hard to produce anyway,
+# therefore that's acceptable.  In most practical cases, the missing
+# brace would be detected directly in the line where it is produced.
+MISSING_BRACE_INDIRECT:=       ${:U\${MISSING_BRACE}
+UNCLOSED = $(MISSING_PAREN
+UNCLOSED = ${MISSING_BRACE
+UNCLOSED = ${MISSING_BRACE_INDIRECT}
+



Home | Main Index | Thread Index | Old Index