mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 09:00:28 +00:00
28 lines
392 B
Makefile
28 lines
392 B
Makefile
# $NetBSD: var-readonly.mk,v 1.4 2023/12/20 08:42:10 rillig 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
|
|
.MAKEFLAGS: -dv
|
|
.undef N
|
|
.ifndef N
|
|
.error N should not be undef'd
|
|
.endif
|
|
.MAKEFLAGS: -d0
|
|
|
|
.NOREADONLY: N
|
|
# now we can change it
|
|
N = 69
|
|
.if ${N} == 42
|
|
.error N should not be 42
|
|
.endif
|
|
|
|
all:
|