diff options
| -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> |
