Module Name: src Committed By: rillig Date: Thu Aug 6 05:52:46 UTC 2020
Modified Files: src/usr.bin/make/unit-tests: recursive.mk Log Message: make(1): add rationale and expected behavior to "recursive" test To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/recursive.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/recursive.mk diff -u src/usr.bin/make/unit-tests/recursive.mk:1.1 src/usr.bin/make/unit-tests/recursive.mk:1.2 --- src/usr.bin/make/unit-tests/recursive.mk:1.1 Thu Aug 6 05:36:33 2020 +++ src/usr.bin/make/unit-tests/recursive.mk Thu Aug 6 05:52:45 2020 @@ -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_$(V)) 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} +