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): document why the counter te...



details:   https://anonhg.NetBSD.org/src/rev/9aff99adcec9
branches:  trunk
changeset: 1015201:9aff99adcec9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 17 16:57:17 2020 +0000

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

diffstat:

 usr.bin/make/unit-tests/counter-append.mk |  4 +++-
 usr.bin/make/unit-tests/counter.mk        |  4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r a1f10e540e33 -r 9aff99adcec9 usr.bin/make/unit-tests/counter-append.mk
--- a/usr.bin/make/unit-tests/counter-append.mk Sat Oct 17 16:53:26 2020 +0000
+++ b/usr.bin/make/unit-tests/counter-append.mk Sat Oct 17 16:57:17 2020 +0000
@@ -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
 
diff -r a1f10e540e33 -r 9aff99adcec9 usr.bin/make/unit-tests/counter.mk
--- a/usr.bin/make/unit-tests/counter.mk        Sat Oct 17 16:53:26 2020 +0000
+++ b/usr.bin/make/unit-tests/counter.mk        Sat Oct 17 16:57:17 2020 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index