Lines Matching full:local

1 # $NetBSD: var-scope-local.mk,v 1.11 2024/03/05 23:07:58 rillig Exp $
3 # Tests for target-local variables, such as ${.TARGET} or $@. These variables
8 # The 7 built-in target-local variables are listed in the manual page. They
10 # target-local variables can be defined in dependency lines like
15 # Target-local variables in a target rule
56 # Target-local variables in an inference rule
61 # Target-local variables in a chain of inference rules
73 # The target-local variables can be used in expressions, just like other
76 # these expressions to expand right in time when the target-local variables
83 # target-local variables need to be preserved, including the exact names of
86 # Each of the built-in target-local variables has two equivalent names, for
101 # In the long form of writing a target-local variable, the text of the
114 # text is used instead. This preserves the expressions based on target-local
119 # In the following examples, the expressions are based on target-local
138 # Custom local variables
140 # Additional target-local variables may be defined in dependency lines.
162 # One of the dynamic target-local variables is '.TARGET'. Since this is not
164 # expect: : Making var-scope-local.c out of nothing.
165 var-scope-local.c:
170 # expect: : Making var-scope-local.o from var-scope-local.c.
171 # expect: : Making basename "var-scope-local.o" in "." from "var-scope-local.c" in ".".
175 # The local variables @F, @D, <F, <D are legacy forms.
180 all: var-scope-local.o
187 # Begin tests for custom target-local variables, for all 5 variable assignment
189 all: var-scope-local-assign.o
190 all: var-scope-local-append.o
191 all: var-scope-local-append-global.o
192 all: var-scope-local-default.o
193 all: var-scope-local-subst.o
194 all: var-scope-local-shell.o
196 var-scope-local-assign.o \
197 var-scope-local-append.o \
198 var-scope-local-append-global.o \
199 var-scope-local-default.o \
200 var-scope-local-subst.o \
201 var-scope-local-shell.o:
204 # Target-local variables are enabled by default. Force them to be enabled
217 # expect: Making var-scope-local-assign.o with make 'local' and env 'local'.
218 var-scope-local-assign.o: VAR= local
222 var-scope-local-append.o: VAR+= local
223 # Once a variable is defined in the target-local scope, appending using '+='
227 # expect: Making var-scope-local-append.o with make 'local to var-scope-local-append.o' and env 'local to var-scope-local-append.o'.
228 var-scope-local-append.o: VAR += to ${.TARGET}
236 # 'VAR= global+local'.
237 # expect: Making var-scope-local-append-global.o with make 'global+local' and env 'global+local'.
238 var-scope-local-append-global.o: VAR= ${VAR}+local
240 var-scope-local-default.o: VAR ?= first
241 var-scope-local-default.o: VAR ?= second
245 # expect: Making var-scope-local-default.o with make 'global' and env 'global'.
248 # accessing a global variable and extending it with local modifications. The
251 # assignment as 'VAR := ${VAR}+local' and searches for the variable 'VAR' in
253 # expect: Making var-scope-local-subst.o with make 'global+local' and env 'global+local'.
254 var-scope-local-subst.o: VAR := $${VAR}+local
259 var-scope-local-shell.o: VAR != echo output
265 # expect: Making .USE var-scope-local-use.o with make 'global' and env 'global'.
269 all: var-scope-local-use.o
270 var-scope-local-use.o: a_use