1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

bitbake: user-manual-metadata.xml: Re-write of "Variants - Class Extension Mechanism" section.

Some general rewrites here.

(Bitbake rev: 7149ab6f6e936c19d681f05aa64b123c10f2f3da)

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-02-10 12:31:56 -06:00
committed by Richard Purdie
parent 3940d59e64
commit bfafc2fc3c
@@ -1451,40 +1451,51 @@
<title>Variants - Class Extension Mechanism</title> <title>Variants - Class Extension Mechanism</title>
<para> <para>
Two BitBake features exist to facilitate the creation of BitBake supports two features that facilitate creating
multiple buildable incarnations from a single recipe file. from a single recipe file multiple incarnations of that
</para> recipe file where all incarnations are buildable.
These features are enabled through the
<para> <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link>
The first is <filename>BBCLASSEXTEND</filename>. and
This variable is a space separated list of classes used to "extend" the <link linkend='var-BBVERSIONS'><filename>BBVERSIONS</filename></link>
recipe for each variant. variables:
Here is an example that results in a second incarnation of the current <itemizedlist>
recipe being available. <listitem><para><emphasis><filename>BBCLASSEXTEND</filename>:</emphasis>
This second incarnation will have the "native" class inherited. This variable is a space separated list of classes used to "extend" the
<literallayout class='monospaced'> recipe for each variant.
Here is an example that results in a second incarnation of the current
recipe being available.
This second incarnation will have the "native" class inherited.
<literallayout class='monospaced'>
BBCLASSEXTEND = "native" BBCLASSEXTEND = "native"
</literallayout> </literallayout></para></listitem>
The second feature is <filename>BBVERSIONS</filename>. <listitem><para><emphasis><filename>BBVERSIONS</filename>:</emphasis>
This variable allows a single recipe to build multiple versions of a This variable allows a single recipe to build multiple versions of a
project from a single recipe file, and allows you to specify project from a single recipe file.
conditional metadata (using the <filename>OVERRIDES</filename> You can also specify conditional metadata
mechanism) for a single version, or an optionally named range of versions: (using the
<literallayout class='monospaced'> <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
mechanism) for a single version, or an optionally named range of versions.
Here is an example:
<literallayout class='monospaced'>
BBVERSIONS = "1.0 2.0 git" BBVERSIONS = "1.0 2.0 git"
SRC_URI_git = "git://someurl/somepath.git" SRC_URI_git = "git://someurl/somepath.git"
</literallayout>
<literallayout class='monospaced'>
BBVERSIONS = "1.0.[0-6]:1.0.0+ \ 1.0.[7-9]:1.0.7+" BBVERSIONS = "1.0.[0-6]:1.0.0+ \ 1.0.[7-9]:1.0.7+"
SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1" SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"
</literallayout> </literallayout>
The name of the range will default to the original version of the The name of the range defaults to the original version of the
recipe, so given OE, a recipe file of <filename>foo_1.0.0+.bb</filename> recipe.
will default the name of its versions to <filename>1.0.0+</filename>. For example, in OpenEmbedded, the recipe file
This is useful, as the range name is not only placed into overrides; <filename>foo_1.0.0+.bb</filename> creates a default name range
it's also made available for the metadata to use in the form of the of <filename>1.0.0+</filename>.
<filename>BPV</filename> variable, for use in This is useful because the range name is not only placed
<filename>file://</filename> search paths (<filename>FILESPATH</filename>). into overrides, but it is also made available for the metadata to use
in the variable that defines the base recipe versions for use in
<filename>file://</filename> search paths
(<link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>).
</para></listitem>
</itemizedlist>
</para> </para>
</section> </section>