1 # $NetBSD: recursive.mk,v 1.4 2020/11/09 20:50:56 rillig Exp $
3 # In -dL mode, a variable may get expanded before it makes sense.
4 # This would stop make from doing anything since the "recursive" error
5 # is fatal and exits immediately.
7 # The purpose of evaluating that variable early was just to detect
8 # whether there are unclosed variables. It might be enough to parse the
9 # variable value without VARE_WANTRES for that purpose.
11 # Seen in pkgsrc/x11/libXfixes, and probably many more package that use
16 AM_V_lt= ${am__v_lt_${V}}
17 am__v_lt_= ${am__v_lt_${AM_DEFAULT_VERBOSITY}}
21 # On 2020-08-06, make reported: "Variable am__v_lt_ is recursive."
22 libXfixes_la_LINK= ... ${AM_V_lt} ...
25 AM_DEFAULT_VERBOSITY= 1
28 # The purpose of the -dL flag is to detect unclosed variables. This
29 # can be achieved by just parsing the variable and not evaluating it.
31 # When the variable is only parsed but not evaluated, bugs in nested
32 # variables are not discovered. But these are hard to produce anyway,
33 # therefore that's acceptable. In most practical cases, the missing
34 # brace would be detected directly in the line where it is produced.
35 MISSING_BRACE_INDIRECT:= ${:U\${MISSING_BRACE}
36 UNCLOSED= $(MISSING_PAREN
37 UNCLOSED= ${MISSING_BRACE
38 UNCLOSED= ${MISSING_BRACE_INDIRECT}