xref: /freebsd/contrib/bmake/unit-tests/var-readonly.mk (revision 7ab1a32cd43cbae61ad4dd435d6a482bbf61cb52)
1# $NetBSD: var-readonly.mk,v 1.4 2023/12/20 08:42:10 rillig Exp $
2
3# the answer
4N = 42
5.READONLY: N
6# this should be ignored
7N = 666
8.if ${N} != 42
9.error N ($N) should be 42
10.endif
11
12# undef should fail
13.MAKEFLAGS: -dv
14.undef N
15.ifndef N
16.error N should not be undef'd
17.endif
18.MAKEFLAGS: -d0
19
20.NOREADONLY: N
21# now we can change it
22N = 69
23.if ${N} == 42
24.error N should not be 42
25.endif
26
27all:
28