Variants - Class Extension Mechanism
- Two BitBake features exist to facilitate the creation of
- multiple buildable incarnations from a single recipe file.
-
-
-
- The first is BBCLASSEXTEND.
- This variable is a space separated list of classes used to "extend" the
- 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.
-
+ BitBake supports two features that facilitate creating
+ from a single recipe file multiple incarnations of that
+ recipe file where all incarnations are buildable.
+ These features are enabled through the
+ BBCLASSEXTEND
+ and
+ BBVERSIONS
+ variables:
+
+ BBCLASSEXTEND:
+ This variable is a space separated list of classes used to "extend" the
+ 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.
+
BBCLASSEXTEND = "native"
-
- The second feature is BBVERSIONS.
- This variable allows a single recipe to build multiple versions of a
- project from a single recipe file, and allows you to specify
- conditional metadata (using the OVERRIDES
- mechanism) for a single version, or an optionally named range of versions:
-
+
+ BBVERSIONS:
+ This variable allows a single recipe to build multiple versions of a
+ project from a single recipe file.
+ You can also specify conditional metadata
+ (using the
+ OVERRIDES
+ mechanism) for a single version, or an optionally named range of versions.
+ Here is an example:
+
BBVERSIONS = "1.0 2.0 git"
SRC_URI_git = "git://someurl/somepath.git"
-
-
+
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"
-
- The name of the range will default to the original version of the
- recipe, so given OE, a recipe file of foo_1.0.0+.bb
- will default the name of its versions to 1.0.0+.
- This is useful, as the range name is not only placed into overrides;
- it's also made available for the metadata to use in the form of the
- BPV variable, for use in
- file:// search paths (FILESPATH).
+
+ The name of the range defaults to the original version of the
+ recipe.
+ For example, in OpenEmbedded, the recipe file
+ foo_1.0.0+.bb creates a default name range
+ of 1.0.0+.
+ This is useful because the range name is not only placed
+ 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
+ file:// search paths
+ (FILESPATH).
+
+