Module Name:    src
Committed By:   rillig
Date:           Fri Aug 28 04:05:35 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: Makefile deptgt-suffixes.mk

Log Message:
make(1): add test for the undocumented .NULL special dependency target


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-suffixes.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.122 src/usr.bin/make/unit-tests/Makefile:1.123
--- src/usr.bin/make/unit-tests/Makefile:1.122	Fri Aug 28 03:51:06 2020
+++ src/usr.bin/make/unit-tests/Makefile	Fri Aug 28 04:05:35 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.122 2020/08/28 03:51:06 rillig Exp $
+# $NetBSD: Makefile,v 1.123 2020/08/28 04:05:35 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -322,6 +322,8 @@ ENV.varmisc+=		FROM_ENV_BEFORE=env
 ENV.varmisc+=		FROM_ENV_AFTER=env
 
 # Override make flags for some of the tests; default is -k.
+# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of
+# settings FLAGS.test=-dv here, since that is closer to the test code.
 FLAGS.archive=		-dA
 FLAGS.counter=		-dv
 FLAGS.doterror=		# none
@@ -360,6 +362,8 @@ SED_CMDS.varname-dot-shell+=	-e 's,\[/[^
 
 # Some tests need an additional round of postprocessing.
 POSTPROC.counter=	${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
+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-dot-shell= \

Index: src/usr.bin/make/unit-tests/deptgt-suffixes.mk
diff -u src/usr.bin/make/unit-tests/deptgt-suffixes.mk:1.2 src/usr.bin/make/unit-tests/deptgt-suffixes.mk:1.3
--- src/usr.bin/make/unit-tests/deptgt-suffixes.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/deptgt-suffixes.mk	Fri Aug 28 04:05:35 2020
@@ -1,8 +1,18 @@
-# $NetBSD: deptgt-suffixes.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: deptgt-suffixes.mk,v 1.3 2020/08/28 04:05:35 rillig Exp $
 #
 # Tests for the special target .SUFFIXES in dependency declarations.
+#
+# See also:
+#	varname-dot-includes.mk
+#	varname-dot-libs.mk
+
+.MAKEFLAGS: -dg1
+
+.SUFFIXES: .custom-null
 
-# TODO: Implementation
+# TODO: What is the effect of this? How is it useful?
+.NULL: .custom-null
+.PATH.custom-null: . ..
 
 all:
 	@:;

Reply via email to