From f2e10fecd2c3b6023792bff91ae0562845c19fc5 Mon Sep 17 00:00:00 2001 From: sjg Date: Mon, 19 Jun 2023 15:37:48 +0000 Subject: Test that .undef of readOnly variable fails --- usr.bin/make/unit-tests/var-readonly.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.bin/make') diff --git a/usr.bin/make/unit-tests/var-readonly.mk b/usr.bin/make/unit-tests/var-readonly.mk index 67e6c0cb828..050b44d1b4e 100644 --- a/usr.bin/make/unit-tests/var-readonly.mk +++ b/usr.bin/make/unit-tests/var-readonly.mk @@ -1,4 +1,4 @@ -# $NetBSD: var-readonly.mk,v 1.2 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: var-readonly.mk,v 1.3 2023/06/19 15:37:48 sjg Exp $ # the answer N = 42 @@ -9,6 +9,12 @@ N = 666 .error N ($N) should be 42 .endif +# undef should fail +.undef N +.ifndef N +.error N should not be undef'd +.endif + .NOREADONLY: N # now we can change it N = 69 -- cgit