Module Name: src Committed By: rillig Date: Wed Dec 20 08:42:10 UTC 2023
Modified Files: src/usr.bin/make/unit-tests: var-readonly.exp var-readonly.mk Log Message: tests/make: demonstrate confusing debug log for read-only variables The message 'delete %s' that occurs above the 'readOnly' looks as if the variable would indeed be deleted. The wording in the 'readOnly' line is unclear. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/var-readonly.exp cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/var-readonly.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/var-readonly.exp diff -u src/usr.bin/make/unit-tests/var-readonly.exp:1.1 src/usr.bin/make/unit-tests/var-readonly.exp:1.2 --- src/usr.bin/make/unit-tests/var-readonly.exp:1.1 Tue Jan 24 00:20:00 2023 +++ src/usr.bin/make/unit-tests/var-readonly.exp Wed Dec 20 08:42:10 2023 @@ -1 +1,5 @@ +Global: delete N +Global: delete N (readOnly) +Global: .MAKEFLAGS = -r -k -d v -d +Global: .MAKEFLAGS = -r -k -d v -d 0 exit status 0 Index: src/usr.bin/make/unit-tests/var-readonly.mk diff -u src/usr.bin/make/unit-tests/var-readonly.mk:1.3 src/usr.bin/make/unit-tests/var-readonly.mk:1.4 --- src/usr.bin/make/unit-tests/var-readonly.mk:1.3 Mon Jun 19 15:37:48 2023 +++ src/usr.bin/make/unit-tests/var-readonly.mk Wed Dec 20 08:42:10 2023 @@ -1,4 +1,4 @@ -# $NetBSD: var-readonly.mk,v 1.3 2023/06/19 15:37:48 sjg Exp $ +# $NetBSD: var-readonly.mk,v 1.4 2023/12/20 08:42:10 rillig Exp $ # the answer N = 42 @@ -10,10 +10,12 @@ N = 666 .endif # undef should fail +.MAKEFLAGS: -dv .undef N .ifndef N .error N should not be undef'd .endif +.MAKEFLAGS: -d0 .NOREADONLY: N # now we can change it