freebsd-src/unit-tests/var-scope-local-legacy.mk
Simon J. Gerraty 2e36ab2363 Import bmake-20230126
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)
2023-01-27 16:23:54 -08:00

18 lines
677 B
Makefile

# $NetBSD: var-scope-local-legacy.mk,v 1.2 2022/09/27 19:18:45 rillig Exp $
#
# Tests for legacy target-local variables, such as ${<F} or ${@D}.
all: .PHONY
# Only variables of length 2 can be legacy, this one cannot.
: LEN4=${LEN4:Uundef}_
# The second character of the name must be 'D' or 'F'.
: XY=${XY:Uundef}_
# The first character must name one of the 7 predefined local
# variables, 'A' is not such a character.
: AF=${AF:Uundef}_
# The variable '.MEMBER' is undefined, therefore '%D' and '%F' are
# undefined as well.
: %D=${%D:Uundef}_ %F=${%F:Uundef}_
# The directory name of the target is '.', its basename is 'all'.
: @D=${@D:Uundef}_ @F=${@F:Uundef}_