[oe-commits] [bitbake] 02/02: bitbake-user-manual: Added new "Line Joining" section.
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 8 16:37:56 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit a2768ecae7846d72a1bdb7cbbc5e8d242af854f6
Author: Scott Rifenbark <srifenbark at gmail.com>
AuthorDate: Wed Oct 19 09:10:17 2016 -0700
bitbake-user-manual: Added new "Line Joining" section.
Fixes [YOCTO #10444]
Added a new section about syntax called "Line Joining". The
section describes how you can use the backslash character (\)
to joing stuff.
Signed-off-by: Scott Rifenbark <srifenbark at gmail.com>
---
.../bitbake-user-manual-metadata.xml | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index 6103f34..badc7c0 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -61,6 +61,48 @@
</para>
</section>
+ <section id='line-joining'>
+ <title>Line Joining</title>
+
+ <para>
+ Outside of
+ <link linkend='functions'>functions</link>, BitBake joins
+ any line ending in a backslash character ("\")
+ with the following line before parsing statements.
+ The most common use for the "\" character is to split variable
+ assignments over multiple lines, as in the following example:
+ <literallayout class='monospaced'>
+ FOO = "bar \
+ baz \
+ qaz"
+ </literallayout>
+ Both the "\" character and the newline character
+ that follow it are removed when joining lines.
+ Thus, no newline characters end up in the value of
+ <filename>FOO</filename>.
+ </para>
+
+ <para>
+ Consider this additional example where the two
+ assignments both assign "barbaz" to
+ <filename>FOO</filename>:
+ <literallayout class='monospaced'>
+ FOO = "barbaz"
+
+ FOO = "bar\
+ baz"
+ </literallayout>
+ <note>
+ BitBake does not interpret escape sequences like
+ "\n" in variable values.
+ For these to have an effect, the value must be passed
+ to some utility that interprets escape sequences,
+ such as <filename>printf</filename> or
+ <filename>echo -n</filename>.
+ </note>
+ </para>
+ </section>
+
<section id='variable-expansion'>
<title>Variable Expansion</title>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list