From 483dff1bc453224980751aa6c1751e3225669d4d Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 8 Jun 2007 07:10:19 +0000 Subject: usermanual/recipes: Put some basic info in the classes section. --- usermanual/chapters/recipes.xml | 66 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/usermanual/chapters/recipes.xml b/usermanual/chapters/recipes.xml index 5672067af8..18238cead0 100644 --- a/usermanual/chapters/recipes.xml +++ b/usermanual/chapters/recipes.xml @@ -2370,21 +2370,79 @@ addtask unpack_extra after do_unpack before do_patch
Classes: The separation of common functionality - This section is to be completed. + Often a certain pattern is followed in more than one recipe, or + maybe some complex python based functionality is required to achieve the + desired end result. This is achieved through the use of classes, which can + be found in the classes subdirectory at the top-level of on OE + checkout. + + Being aware of the available classes and understanding their + functionality is important because classes: - What are classes + Save developers time being performing actions that they would + otherwise need to perform themselves; - How you use classes + Perform a lot of actions in the background making a lot of + recipes difficult to understand unless you are aware of classes and + how they work; - Some example - autotools, update-r.d, distutils + A lot of detail on how things work can be learnt for looking at + how classes are implement. + + A class is used via the inherit method. The following is an example + for the curl recipe showing that it uses three + classes:inherit autotools pkgconfig binconfigIn this case + it is utilising the services of three separate classes: + + + + autotools + + + The is used by programs + that use the GNU configuration tools and takes care of the + configuration and compilation of the software; + + + + + pkgconfig + + + The is used to stage the + .pc files which are used by the pkg-config program to provide information + about the package to other software that wants to link to this + software; + + + + + binconfig + + + The is used to stage the + <name>-config files which are used to + provide information about the package to other software that wants + to link to this software; + + + + + Each class is implemented via the file in the classes subdirectory named <classname>.bbclass and these can be examined + for further details on a particular class, although sometimes it's not + easy to understand everything that's happening. Many of the classes are + covered in detail in various sections in this user manual.
-- cgit 1.2.3-korg