From 36e3daf7f924fbf15ab9c1764c424046adffff5e Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 28 Feb 2012 12:19:43 -0600 Subject: documentation/poky-ref-manual/ref-classes.xml: New externalsrc class Added a new class description for externalsrc.bbclass. This addition was driven by feedback from two community members inside Intel whose feedback was picked up by Darren Hart. Reported-by: Inaky Perez-Gonzales Reported-by: Mohamed Abbas (From yocto-docs rev: 1217d26993f9e5f3e6914e366b1fed34debbd242) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/poky-ref-manual/ref-classes.xml | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'documentation/poky-ref-manual') diff --git a/documentation/poky-ref-manual/ref-classes.xml b/documentation/poky-ref-manual/ref-classes.xml index 9238ba2406..09b3161fb7 100644 --- a/documentation/poky-ref-manual/ref-classes.xml +++ b/documentation/poky-ref-manual/ref-classes.xml @@ -519,6 +519,66 @@ +
+ Using External Source - <filename>externalsrc.bbclass</filename> + + + You can use this class to build software from source code that is external to the + Yocto Project build system. + In other words, your source code resides in an external tree outside of the Yocto Project. + Building software from an external source tree means that the normal fetch, unpack, and + patch process is not used. + + + + To use the class, you need to define the + S variable to point to the directory that contains the source files. + You also need to have your recipe inherit the externalsrc.bbclass class. + + + + This class expects the source code to support recipe builds that use the + B variable to point to the directory in + which the Yocto Project build system places the generated objects built from the recipes. + By default, the B directory is set to the following, which is separate from the + source directory (S): + + ${WORKDIR}/${BPN}-{PV}/ + + See the glossary entries for the + WORKDIR, + BPN, + PV, + S, and + B for more information. + + + + You can build object files in the external tree by setting the + B variable equal to "${S}". + However, this practice does not work well if you use the source for more than one variant + (i.e., "natives" such as quilt-native, + or "crosses" such as gcc-cross). + So, be sure there are no "native", "cross", or "multilib" variants of the recipe. + + + + If you do want to build different variants of a recipe, you can use the + BBCLASSEXTEND variable. + When you do, the B variable must support the + recipe's ability to build variants in different working directories. + Alternatively, you can make sure that separate recipes exist that each + use the BBCLASSEXTEND variable to build each variant. + The separate recipes can inherit a single target recipe. + + + + For information on how to use this class, see the + "Building + Software from an External Source" section in the Yocto Project Development Manual. + +
+
Other Classes -- cgit v1.2.3-54-g00ecf