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:
Save developers time being performing actions that they would otherwise need to perform themselves;
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;
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 binconfig
In this case it is utilising the services of three separate classes:
The autotools class is used by programs that use the GNU configuration tools and takes care of the configuration and compilation of the software;
The pkgconfig class 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;
The binconfig class is used to stage the
Each class is implemented via the file in the classes subdirectory named