aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/var-readonly.mk
blob: 050b44d1b4e8c2291a35420d9861e5599b867e78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# $NetBSD: var-readonly.mk,v 1.3 2023/06/19 15:37:48 sjg Exp $

# the answer
N = 42
.READONLY: N
# this should be ignored
N = 666
.if ${N} != 42
.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
.if ${N} == 42
.error N should not be 42
.endif

all: