make(1): add test for unintended "recursive variable" in -dL mode
This commit is contained in:
parent
237062f441
commit
4d4fd97a93
@ -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
|
||||
|
@ -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.
|
||||
|
4
usr.bin/make/unit-tests/recursive.exp
Normal file
4
usr.bin/make/unit-tests/recursive.exp
Normal file
@ -0,0 +1,4 @@
|
||||
Variable am__v_lt_ is recursive.
|
||||
|
||||
make: stopped in unit-tests
|
||||
exit status 2
|
22
usr.bin/make/unit-tests/recursive.mk
Normal file
22
usr.bin/make/unit-tests/recursive.mk
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user