xref: /freebsd/contrib/bmake/unit-tests/var-scope-local-legacy.mk (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1# $NetBSD: var-scope-local-legacy.mk,v 1.2 2022/09/27 19:18:45 rillig Exp $
2#
3# Tests for legacy target-local variables, such as ${<F} or ${@D}.
4
5all: .PHONY
6	# Only variables of length 2 can be legacy, this one cannot.
7	: LEN4=${LEN4:Uundef}_
8	# The second character of the name must be 'D' or 'F'.
9	: XY=${XY:Uundef}_
10	# The first character must name one of the 7 predefined local
11	# variables, 'A' is not such a character.
12	: AF=${AF:Uundef}_
13	# The variable '.MEMBER' is undefined, therefore '%D' and '%F' are
14	# undefined as well.
15	: %D=${%D:Uundef}_ %F=${%F:Uundef}_
16	# The directory name of the target is '.', its basename is 'all'.
17	: @D=${@D:Uundef}_ @F=${@F:Uundef}_
18