diff options
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r-- | documentation/ref-manual/ref-classes.xml | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml index 27edfde33d..e65004f8ff 100644 --- a/documentation/ref-manual/ref-classes.xml +++ b/documentation/ref-manual/ref-classes.xml | |||
@@ -6,36 +6,39 @@ | |||
6 | <title>Classes</title> | 6 | <title>Classes</title> |
7 | 7 | ||
8 | <para> | 8 | <para> |
9 | Class files are used to abstract common functionality and share it amongst multiple | 9 | Class files are used to abstract common functionality and share it amongst |
10 | <filename>.bb</filename> files. | 10 | multiple recipe (<filename>.bb</filename>) files. |
11 | To use a class file, you simply make sure the recipe inherits the class. | ||
12 | In most cases, when a recipe inherits a class it is enough to enable its | ||
13 | features. | ||
14 | There are cases, however, where in the recipe you might need to set | ||
15 | variables or override some default behavior. | ||
16 | </para> | ||
17 | |||
18 | <para> | ||
11 | Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually | 19 | Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually |
12 | found in a <filename>.bb</filename> file can also be placed in a class | 20 | found in a recipe can also be placed in a class file. |
13 | file. | 21 | Class files are identified by the extension <filename>.bbclass</filename> |
14 | Class files are identified by the extension <filename>.bbclass</filename> and are usually placed | 22 | and are usually placed in a <filename>classes/</filename> directory beneath |
15 | in a <filename>classes/</filename> directory beneath the | 23 | the <filename>meta*/</filename> directory found in the |
16 | <filename>meta*/</filename> directory found in the | ||
17 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. | 24 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. |
18 | Class files can also be pointed to by | 25 | Class files can also be pointed to by |
19 | <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link> | 26 | <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link> |
20 | (e.g. <filename>build/</filename>) in the same way as | 27 | (e.g. <filename>build/</filename>) in the same way as |
21 | <filename>.conf</filename> files in the <filename>conf</filename> directory. | 28 | <filename>.conf</filename> files in the <filename>conf</filename> directory. |
22 | Class files are searched for in <link linkend='var-BBPATH'><filename>BBPATH</filename></link> | 29 | Class files are searched for in |
23 | using the same method by which <filename>.conf</filename> files are searched. | 30 | <link linkend='var-BBPATH'><filename>BBPATH</filename></link> |
24 | </para> | 31 | using the same method by which <filename>.conf</filename> files are |
25 | 32 | searched. | |
26 | <para> | ||
27 | In most cases inheriting the class is enough to enable its features, although | ||
28 | for some classes you might need to set variables or override some of the | ||
29 | default behavior. | ||
30 | </para> | 33 | </para> |
31 | 34 | ||
32 | <para> | 35 | <para> |
33 | This chapter discusses only the most useful and important classes. | 36 | This chapter discusses only the most useful and important classes. |
34 | Other classes do exist within the <filename>meta/classes</filename> | 37 | Other classes do exist within the <filename>meta/classes</filename> |
35 | directory in the | 38 | directory in the |
36 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. | 39 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. |
37 | You can reference the <filename>.bbclass</filename> files directly | 40 | You can reference the <filename>.bbclass</filename> files directly |
38 | for more information. | 41 | for more information. |
39 | </para> | 42 | </para> |
40 | 43 | ||
41 | <section id='ref-classes-base'> | 44 | <section id='ref-classes-base'> |