mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 15:32:14 +02:00
bitbake: bitbake-user-manual: immediate-variable-expansion: Correct description
References to undefined variables are preserved as is and do not expand to nothing as in GNU Make. (Bitbake rev: 4780df48d5998d619dc36b699400e344187fc134) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
db11b30cea
commit
9c20e8de6f
@@ -294,17 +294,20 @@
|
||||
rather than when the variable is actually used:
|
||||
<literallayout class='monospaced'>
|
||||
T = "123"
|
||||
A := "${B} ${A} test ${T}"
|
||||
A := "test ${T}"
|
||||
T = "456"
|
||||
B = "${T} bval"
|
||||
B := "${T} ${C}"
|
||||
C = "cval"
|
||||
C := "${C}append"
|
||||
</literallayout>
|
||||
In this example, <filename>A</filename> contains
|
||||
"test 123" because <filename>${B}</filename> and
|
||||
<filename>${A}</filename> at the time of parsing are undefined,
|
||||
which leaves "test 123".
|
||||
And, the variable <filename>C</filename>
|
||||
"test 123", even though the final value of <filename>T</filename>
|
||||
is "456".
|
||||
The variable <filename>B</filename> will end up containing "456 cvalappend".
|
||||
This is because references to undefined variables are preserved as is
|
||||
during (immediate)expansion. This is in contrast to GNU Make, where undefined
|
||||
variables expand to nothing.
|
||||
The variable <filename>C</filename>
|
||||
contains "cvalappend" since <filename>${C}</filename> immediately
|
||||
expands to "cval".
|
||||
</para>
|
||||
|
||||
Reference in New Issue
Block a user