Lines Matching full:target
3 # Tests for target-local variables, such as ${.TARGET} or $@. These variables
5 # target. In contrast, global variables are typically created when the
8 # The 7 built-in target-local variables are listed in the manual page. They
9 # are defined just before the target is actually made. Additional
10 # target-local variables can be defined in dependency lines like
11 # 'target: VAR=value', one at a time.
15 # Target-local variables in a target rule
17 # In target rules, '$*' only strips the extension off the pathname if the
20 # expect: target-rule.ext: * = <target-rule.ext>
21 all: target-rule.ext dir/subdir/target-rule.ext
22 target-rule.ext dir/subdir/target-rule.ext: .PHONY
31 # In target rules, '$*' strips the extension off the pathname of the target
34 # expect: target-rule.ir-gen-from: * = <target-rule>
35 all: target-rule.ir-gen-from dir/subdir/target-rule-dir.ir-gen-from
36 target-rule.ir-gen-from dir/subdir/target-rule-dir.ir-gen-from:
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
74 # variables. When these expressions are evaluated outside of a target, these
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
87 # example '@' is equivalent to '.TARGET'. The implementation might
91 # expressions like ${@}, ${.TARGET} ${VAR:Mpattern} (see Var_Parse,
95 # '$(.TARGET)'; note that the alias is not written with braces, as would be
98 .if $@ != "\$\(.TARGET)"
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
127 .if ${.TARGET:L} != ".TARGET"
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
166 : Making ${.TARGET} ${.IMPSRC:Dfrom ${.IMPSRC}:Uout of nothing}.
168 # This is a suffix transformation rule, so both '.TARGET' and '.IMPSRC' are
173 : Making ${.TARGET} from ${.IMPSRC}.
181 # The ::= modifier overwrites the .TARGET variable in the node
184 : ${.TARGET} ${.TARGET::=overwritten}${.TARGET}
187 # Begin tests for custom target-local variables, for all 5 variable assignment
202 @echo "Making ${.TARGET} with make '"${VAR:Q}"' and env '$$VAR'."
204 # Target-local variables are enabled by default. Force them to be enabled
221 # look up the variable in the target's own scope.
223 # Once a variable is defined in the target-local scope, appending using '+='
224 # behaves as expected. Note that the expression '${.TARGET}' is not resolved
226 # target is actually made.
228 var-scope-local-append.o: VAR += to ${.TARGET}
263 # the ultimate target's context is searched; the variable assignments from the
264 # .USE target are not copied to the ultimate target's.
267 @echo "Making .USE ${.TARGET} with make '"${VAR:Q}"' and env '$$VAR'."