mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 02:06:37 +00:00
2e36ab2363
Relevant/interesting changes (see ChangeLog for more): o variables like .newline and .MAKE.{GID,PID,PPID,UID} should be read-only. o .[NO]READONLY: for control of read-only variables o .SYSPATH: for controlling the path searched for makefiles o allow for white-space between command specifiers @+- o add more details to warning 'Extra targets ignored' o make.1: sync list of built-in variables with reality sort list of built-in variables o cond.c: add more details to error message for numeric comparison o job.c: fix handling of null bytes in output o Allow .break to terminate a .for loop early o var.c: fix out-of-bounds errors when parsing o fix exit status for '-q' (since 1994)
21 lines
280 B
Makefile
21 lines
280 B
Makefile
# $NetBSD: var-readonly.mk,v 1.1 2023/01/24 00:20:00 sjg Exp $
|
|
|
|
# the answer
|
|
N = 42
|
|
.READONLY: N
|
|
# this should be ignored
|
|
N = 666
|
|
.if ${N} != 42
|
|
.error N ($N) should be 42
|
|
.endif
|
|
|
|
.NOREADONLY: N
|
|
# now we can change it
|
|
N = 69
|
|
.if ${N} == 42
|
|
.error N should not be 42
|
|
.endif
|
|
|
|
all:
|
|
|