Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): move MAKEFLAGS handling in ...



details:   https://anonhg.NetBSD.org/src/rev/4de2a2917c11
branches:  trunk
changeset: 977612:4de2a2917c11
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Oct 29 18:19:41 2020 +0000

description:
make(1): move MAKEFLAGS handling in vardebug test to the test itself

diffstat:

 usr.bin/make/unit-tests/Makefile     |  4 +---
 usr.bin/make/unit-tests/vardebug.exp |  9 +++++++--
 usr.bin/make/unit-tests/vardebug.mk  |  6 +++---
 3 files changed, 11 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r 6f58385a24e7 -r 4de2a2917c11 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Thu Oct 29 17:27:12 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Thu Oct 29 18:19:41 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.175 2020/10/24 02:25:02 rillig Exp $
+# $NetBSD: Makefile,v 1.176 2020/10/29 18:19:41 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -397,7 +397,6 @@
 FLAGS.order=           -j1
 FLAGS.recursive=       -dL
 FLAGS.sh-leading-plus= -n
-FLAGS.vardebug=                -k -dv FROM_CMDLINE=
 FLAGS.varmod-match-escape= -dv
 FLAGS.varname-dot-shell= -dpv
 FLAGS.varname-empty=   -dv '$${:U}=cmdline-u' '=cmline-plain'
@@ -439,7 +438,6 @@
 # Some tests need an additional round of postprocessing.
 POSTPROC.deptgt-suffixes= \
                        ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
-POSTPROC.vardebug=     ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
 POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p'
 POSTPROC.varname=      ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p'
 POSTPROC.varname-dot-shell= \
diff -r 6f58385a24e7 -r 4de2a2917c11 usr.bin/make/unit-tests/vardebug.exp
--- a/usr.bin/make/unit-tests/vardebug.exp      Thu Oct 29 17:27:12 2020 +0000
+++ b/usr.bin/make/unit-tests/vardebug.exp      Thu Oct 29 18:19:41 2020 +0000
@@ -1,4 +1,6 @@
-Global:RELEVANT = yes
+Global:delete FROM_CMDLINE (not found)
+Command:FROM_CMDLINE = 
+Global:.MAKEOVERRIDES =  FROM_CMDLINE
 Global:VAR = added
 Global:VAR = overwritten
 Global:delete VAR
@@ -76,5 +78,8 @@
 make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown})
 Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES
 make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED})
-Global:RELEVANT = no
+Global:.MAKEFLAGS =  -r -k -d v -d
+Global:.MAKEFLAGS =  -r -k -d v -d 0
+make: Fatal errors encountered -- cannot continue
+make: stopped in unit-tests
 exit status 1
diff -r 6f58385a24e7 -r 4de2a2917c11 usr.bin/make/unit-tests/vardebug.mk
--- a/usr.bin/make/unit-tests/vardebug.mk       Thu Oct 29 17:27:12 2020 +0000
+++ b/usr.bin/make/unit-tests/vardebug.mk       Thu Oct 29 18:19:41 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: vardebug.mk,v 1.3 2020/08/08 14:28:46 rillig Exp $
+# $NetBSD: vardebug.mk,v 1.4 2020/10/29 18:19:41 rillig Exp $
 #
 # Demonstrates the debugging output for var.c.
 
-RELEVANT=      yes
+.MAKEFLAGS: -dv FROM_CMDLINE=
 
 VAR=           added           # VarAdd
 VAR=           overwritten     # Var_Set
@@ -53,7 +53,7 @@
 .if ${UNDEFINED}
 .endif
 
-RELEVANT=      no
+.MAKEFLAGS: -d0
 
 all:
        @:



Home | Main Index | Thread Index | Old Index