Module Name: src
Committed By: rillig
Date: Thu Oct 29 18:19:41 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: Makefile vardebug.exp vardebug.mk
Log Message:
make(1): move MAKEFLAGS handling in vardebug test to the test itself
To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/vardebug.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.175 src/usr.bin/make/unit-tests/Makefile:1.176
--- src/usr.bin/make/unit-tests/Makefile:1.175 Sat Oct 24 02:25:02 2020
+++ src/usr.bin/make/unit-tests/Makefile Thu Oct 29 18:19:41 2020
@@ -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.opt-warnings-as-errors= -W
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 @@ SED_CMDS.varname-dot-shell+= -e 's,\[/[^
# 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= \
Index: src/usr.bin/make/unit-tests/vardebug.exp
diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.9 src/usr.bin/make/unit-tests/vardebug.exp:1.10
--- src/usr.bin/make/unit-tests/vardebug.exp:1.9 Wed Sep 30 05:58:22 2020
+++ src/usr.bin/make/unit-tests/vardebug.exp Thu Oct 29 18:19:41 2020
@@ -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 @@ Result of ${:unknown} is error (VARE_UND
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
Index: src/usr.bin/make/unit-tests/vardebug.mk
diff -u src/usr.bin/make/unit-tests/vardebug.mk:1.3 src/usr.bin/make/unit-tests/vardebug.mk:1.4
--- src/usr.bin/make/unit-tests/vardebug.mk:1.3 Sat Aug 8 14:28:46 2020
+++ src/usr.bin/make/unit-tests/vardebug.mk Thu Oct 29 18:19:41 2020
@@ -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 @@ VAR+= 3
.if ${UNDEFINED}
.endif
-RELEVANT= no
+.MAKEFLAGS: -d0
all:
@: