2021-06-25 18:16:24 +00:00
|
|
|
# $NetBSD: recursive.mk,v 1.5 2021/03/15 12:15:03 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
|
|
|
# In -dL mode, a variable may get expanded before it makes sense.
|
|
|
|
# This would stop make from doing anything since the "recursive" error
|
|
|
|
# is fatal and exits immediately.
|
|
|
|
#
|
|
|
|
# The purpose of evaluating that variable early was just to detect
|
2021-06-25 18:16:24 +00:00
|
|
|
# whether there are unclosed variables. The variable value is therefore
|
|
|
|
# parsed with VARE_PARSE_ONLY for that purpose.
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
|
|
|
# Seen in pkgsrc/x11/libXfixes, and probably many more package that use
|
|
|
|
# GNU Automake.
|
|
|
|
|
2020-11-20 03:54:37 +00:00
|
|
|
.MAKEFLAGS: -dL
|
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
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=
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
# On 2020-08-06, make reported: "Variable am__v_lt_ is recursive."
|
2020-11-07 19:39:21 +00:00
|
|
|
libXfixes_la_LINK= ... ${AM_V_lt} ...
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
# somewhere later ...
|
2020-11-07 19:39:21 +00:00
|
|
|
AM_DEFAULT_VERBOSITY= 1
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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}
|
2020-11-07 19:39:21 +00:00
|
|
|
UNCLOSED= $(MISSING_PAREN
|
|
|
|
UNCLOSED= ${MISSING_BRACE
|
|
|
|
UNCLOSED= ${MISSING_BRACE_INDIRECT}
|