dev-manual: Edits to the "Understanding Recipe Syntax" section.

(From yocto-docs rev: 9808ea79a1e219df794948bd42bc086ab4d56d9f)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2014-05-07 15:34:02 +03:00 committed by Richard Purdie
parent f7a161253f
commit 1744a1e5b9
1 changed files with 16 additions and 15 deletions

View File

@ -1292,10 +1292,10 @@
<itemizedlist>
<listitem><para><emphasis>Functions:</emphasis>
Functions provide a series of actions to be performed.
Functions are usually used to override the default
implementation of a task function, or to compliment
(append or prepend to an existing function) a default
function.
You usually use functions to override the default
implementation of a task function or to compliment
a default function (i.e. append or prepend to an
existing function).
Standard functions use <filename>sh</filename> shell
syntax, although access to OpenEmbedded variables and
internal methods are also available.</para>
@ -1308,10 +1308,11 @@
mv ${D}${bindir}/sed ${D}${base_bindir}/sed.${PN}
}
</literallayout>
It is also possible to implement new functions, that
are not replacing or complimenting the default
functions, which are called between existing tasks.
It is also possible to implement functions in Python
It is also possible to implement new functions that
are called between existing tasks as long as the
new functions are not replacing or complimenting the
default functions.
You can implement functions in Python
instead of <filename>sh</filename>.
Both of these options are not seen in the majority of
recipes.</para></listitem>
@ -1320,7 +1321,7 @@
variable.
The assignment can be static text or might include
the contents of other variables.
In addition to assignment, appending and prepending
In addition to the assignment, appending and prepending
operations are also supported.</para>
<para>The following example shows some of the ways
you can use variables in recipes:
@ -1332,12 +1333,12 @@
</literallayout>
</para></listitem>
<listitem><para><emphasis>Keywords:</emphasis>
Only a few keywords are used in BitBake recipes.
Keywords are used for things such as including common
functions (<filename>inherit</filename>), loading parts
BitBake recipes use only a few keywords.
You use keywords to include common
functions (<filename>inherit</filename>), load parts
of a recipe from other files
(<filename>include</filename> and
<filename>require</filename>) and exporting variables
<filename>require</filename>) and export variables
to the environment (<filename>export</filename>).</para>
<para>The following example shows the use of some of
these keywords:
@ -1367,7 +1368,7 @@
chapter in the BitBake User Manual.
<itemizedlist>
<listitem><para><emphasis>Line Continuation: <filename>\</filename></emphasis> -
Use the backward slash (<filename>\</filename>
Use the backward slash (<filename>\</filename>)
character to split a statement over multiple lines.
Place the slash character at the end of the line that
is to be continued on the next line:
@ -1551,7 +1552,7 @@
<filename>grep</filename>, <filename>awk</filename>,
and so forth) that you might wish to use.
If in doubt, you should check with multiple
implementations - including those from busybox.
implementations - including those from BusyBox.
</para></listitem>
</itemizedlist>
</para>