Module Name:    src
Committed By:   rillig
Date:           Sat Oct 17 16:57:17 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: counter-append.mk counter.mk

Log Message:
make(1): document why the counter tests failed before 2020-09-23


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/counter-append.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/counter.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/counter-append.mk
diff -u src/usr.bin/make/unit-tests/counter-append.mk:1.3 src/usr.bin/make/unit-tests/counter-append.mk:1.4
--- src/usr.bin/make/unit-tests/counter-append.mk:1.3	Wed Sep 23 07:54:08 2020
+++ src/usr.bin/make/unit-tests/counter-append.mk	Sat Oct 17 16:57:17 2020
@@ -1,10 +1,12 @@
-# $NetBSD: counter-append.mk,v 1.3 2020/09/23 07:54:08 rillig Exp $
+# $NetBSD: counter-append.mk,v 1.4 2020/10/17 16:57:17 rillig Exp $
 #
 # Demonstrates how to let make count the number of times a variable
 # is actually accessed, using the ::+= variable modifier.
 #
 # This works since 2020-09-23.  Before that, the counter ended up at having
 # 6 words, even though the NEXT variable was only accessed 3 times.
+# The cause for this surprising behavior was that the ::= variable modifiers
+# returned an error marker instead of a simple empty string.
 
 RELEVANT=	yes (load-time part)	# just to filter the output
 

Index: src/usr.bin/make/unit-tests/counter.mk
diff -u src/usr.bin/make/unit-tests/counter.mk:1.4 src/usr.bin/make/unit-tests/counter.mk:1.5
--- src/usr.bin/make/unit-tests/counter.mk:1.4	Wed Sep 23 07:54:08 2020
+++ src/usr.bin/make/unit-tests/counter.mk	Sat Oct 17 16:57:17 2020
@@ -1,10 +1,12 @@
-# $NetBSD: counter.mk,v 1.4 2020/09/23 07:54:08 rillig Exp $
+# $NetBSD: counter.mk,v 1.5 2020/10/17 16:57:17 rillig Exp $
 #
 # Demonstrates how to let make count the number of times a variable
 # is actually accessed, using the ::= variable modifier.
 #
 # This works since 2020-09-23.  Before that, the counter ended up at having
 # 4 words, even though the NEXT variable was only accessed 3 times.
+# The cause for this surprising behavior was that the ::= variable modifiers
+# returned an error marker instead of a simple empty string.
 
 RELEVANT=	yes (load-time part)	# just to filter the output
 

Reply via email to