[oe-commits] [bitbake] 02/02: bitbake-user-manual: immediate-variable-expansion: Correct description
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 19 11:29:16 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository bitbake.
commit 4780df48d5998d619dc36b699400e344187fc134
Author: Jacob Kroon <jacob.kroon at gmail.com>
AuthorDate: Thu Mar 19 00:17:37 2020 +0100
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.
Signed-off-by: Jacob Kroon <jacob.kroon at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index bb5a7f8..10b5883 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -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>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list