diff --git a/distrib/sets/lists/tests/mi b/distrib/sets/lists/tests/mi index 3f7db7b1f5f0..28cd75441139 100644 --- a/distrib/sets/lists/tests/mi +++ b/distrib/sets/lists/tests/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.884 2020/08/03 15:43:31 rillig Exp $ +# $NetBSD: mi,v 1.885 2020/08/06 05:36:32 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4598,6 +4598,8 @@ ./usr/tests/usr.bin/make/unit-tests/posix1.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/qequals.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/qequals.mk tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/recursive.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/recursive.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/suffixes.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/suffixes.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/sunshcmd.exp tests-usr.bin-tests compattestfile,atf diff --git a/usr.bin/make/unit-tests/Makefile b/usr.bin/make/unit-tests/Makefile index 82f76b2a8643..819d7dedaa78 100644 --- a/usr.bin/make/unit-tests/Makefile +++ b/usr.bin/make/unit-tests/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.83 2020/08/03 15:43:32 rillig Exp $ +# $NetBSD: Makefile,v 1.84 2020/08/06 05:36:33 rillig Exp $ # # Unit tests for make(1) # @@ -70,6 +70,7 @@ TESTS+= # phony-end # broken by reverting POSIX changes TESTS+= posix TESTS+= # posix1 # broken by reverting POSIX changes TESTS+= qequals +TESTS+= recursive TESTS+= # suffixes # broken by reverting POSIX changes TESTS+= sunshcmd TESTS+= sysv @@ -90,6 +91,7 @@ ENV.counter= -i ENV.envfirst= FROM_ENV=value-from-env ENV.export= -i PATH=${PATH:Q} ENV.lint= -i +ENV.recursive= -i ENV.varmisc= FROM_ENV=env ENV.varmisc+= FROM_ENV_BEFORE=env ENV.varmisc+= FROM_ENV_AFTER=env @@ -101,6 +103,7 @@ FLAGS.envfirst= -e FLAGS.export= -r FLAGS.lint= -dL -k FLAGS.order= -j1 +FLAGS.recursive= -dL FLAGS.vardebug= -k -dv FROM_CMDLINE= # Some tests need extra post-processing. diff --git a/usr.bin/make/unit-tests/recursive.exp b/usr.bin/make/unit-tests/recursive.exp new file mode 100644 index 000000000000..4f142b77f1e3 --- /dev/null +++ b/usr.bin/make/unit-tests/recursive.exp @@ -0,0 +1,4 @@ +Variable am__v_lt_ is recursive. + +make: stopped in unit-tests +exit status 2 diff --git a/usr.bin/make/unit-tests/recursive.mk b/usr.bin/make/unit-tests/recursive.mk new file mode 100644 index 000000000000..55ab91d99e4a --- /dev/null +++ b/usr.bin/make/unit-tests/recursive.mk @@ -0,0 +1,22 @@ +# $NetBSD: recursive.mk,v 1.1 2020/08/06 05:36:33 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 +# is fatal and exits immediately. +# +# The purpose of evaluating that variable early was just to detect +# whether there are unclosed variables. It might be enough to parse the +# variable value without VARE_WANTRES for that purpose. +# +# Seen in pkgsrc/x11/libXfixes, and probably many more package that use +# GNU Automake. + +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 = +libXfixes_la_LINK = ... $(AM_V_lt) ... +.info not reached + +# somewhere later ... +AM_DEFAULT_VERBOSITY = 1