Classes
- Class files are used to abstract common functionality and share it amongst multiple
- .bb files.
+ Class files are used to abstract common functionality and share it amongst
+ multiple recipe (.bb) files.
+ To use a class file, you simply make sure the recipe inherits the class.
+ In most cases, when a recipe inherits a class it is enough to enable its
+ features.
+ There are cases, however, where in the recipe you might need to set
+ variables or override some default behavior.
+
+
+
Any Metadata usually
- found in a .bb file can also be placed in a class
- file.
- Class files are identified by the extension .bbclass and are usually placed
- in a classes/ directory beneath the
- meta*/ directory found in the
+ found in a recipe can also be placed in a class file.
+ Class files are identified by the extension .bbclass
+ and are usually placed in a classes/ directory beneath
+ the meta*/ directory found in the
Source Directory.
Class files can also be pointed to by
BUILDDIR
(e.g. build/) in the same way as
.conf files in the conf directory.
- Class files are searched for in BBPATH
- using the same method by which .conf files are searched.
-
-
-
- In most cases inheriting the class is enough to enable its features, although
- for some classes you might need to set variables or override some of the
- default behavior.
+ Class files are searched for in
+ BBPATH
+ using the same method by which .conf files are
+ searched.
This chapter discusses only the most useful and important classes.
- Other classes do exist within the meta/classes
- directory in the
- Source Directory.
- You can reference the .bbclass files directly
- for more information.
+ Other classes do exist within the meta/classes
+ directory in the
+ Source Directory.
+ You can reference the .bbclass files directly
+ for more information.