diff options
author | Jacob Kroon <jacob.kroon@gmail.com> | 2020-03-19 00:17:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-19 11:28:31 +0000 |
commit | 9c20e8de6f262a4bda7879eb5c43ec5cb9ded016 (patch) | |
tree | e642d3320f0406b6d98eaad642aca5bd130fc8b3 | |
parent | db11b30cea06aff71d0961cdc9085b98c3588f02 (diff) | |
download | poky-9c20e8de6f262a4bda7879eb5c43ec5cb9ded016.tar.gz |
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>
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index bb5a7f861b..10b588352b 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | |||
@@ -294,17 +294,20 @@ | |||
294 | rather than when the variable is actually used: | 294 | rather than when the variable is actually used: |
295 | <literallayout class='monospaced'> | 295 | <literallayout class='monospaced'> |
296 | T = "123" | 296 | T = "123" |
297 | A := "${B} ${A} test ${T}" | 297 | A := "test ${T}" |
298 | T = "456" | 298 | T = "456" |
299 | B = "${T} bval" | 299 | B := "${T} ${C}" |
300 | C = "cval" | 300 | C = "cval" |
301 | C := "${C}append" | 301 | C := "${C}append" |
302 | </literallayout> | 302 | </literallayout> |
303 | In this example, <filename>A</filename> contains | 303 | In this example, <filename>A</filename> contains |
304 | "test 123" because <filename>${B}</filename> and | 304 | "test 123", even though the final value of <filename>T</filename> |
305 | <filename>${A}</filename> at the time of parsing are undefined, | 305 | is "456". |
306 | which leaves "test 123". | 306 | The variable <filename>B</filename> will end up containing "456 cvalappend". |
307 | And, the variable <filename>C</filename> | 307 | This is because references to undefined variables are preserved as is |
308 | during (immediate)expansion. This is in contrast to GNU Make, where undefined | ||
309 | variables expand to nothing. | ||
310 | The variable <filename>C</filename> | ||
308 | contains "cvalappend" since <filename>${C}</filename> immediately | 311 | contains "cvalappend" since <filename>${C}</filename> immediately |
309 | expands to "cval". | 312 | expands to "cval". |
310 | </para> | 313 | </para> |