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:
Jacob Kroon
2020-03-19 00:17:37 +01:00
committed by Richard Purdie
parent db11b30cea
commit 9c20e8de6f

View File

@@ -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>