ref-manual: Updated the introduction text for Classes chapter.

(From yocto-docs rev: fbaae0f02856d58592be1b54117463245e527897)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2013-11-26 07:11:49 -08:00 committed by Richard Purdie
parent 71619842de
commit 4f7fea8ccb
1 changed files with 23 additions and 20 deletions

View File

@ -6,36 +6,39 @@
<title>Classes</title> <title>Classes</title>
<para> <para>
Class files are used to abstract common functionality and share it amongst multiple Class files are used to abstract common functionality and share it amongst
<filename>.bb</filename> files. multiple recipe (<filename>.bb</filename>) 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.
</para>
<para>
Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
found in a <filename>.bb</filename> file can also be placed in a class found in a recipe can also be placed in a class file.
file. Class files are identified by the extension <filename>.bbclass</filename>
Class files are identified by the extension <filename>.bbclass</filename> and are usually placed and are usually placed in a <filename>classes/</filename> directory beneath
in a <filename>classes/</filename> directory beneath the the <filename>meta*/</filename> directory found in the
<filename>meta*/</filename> directory found in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
Class files can also be pointed to by Class files can also be pointed to by
<link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link> <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
(e.g. <filename>build/</filename>) in the same way as (e.g. <filename>build/</filename>) in the same way as
<filename>.conf</filename> files in the <filename>conf</filename> directory. <filename>.conf</filename> files in the <filename>conf</filename> directory.
Class files are searched for in <link linkend='var-BBPATH'><filename>BBPATH</filename></link> Class files are searched for in
using the same method by which <filename>.conf</filename> files are searched. <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
</para> using the same method by which <filename>.conf</filename> files are
searched.
<para>
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.
</para> </para>
<para> <para>
This chapter discusses only the most useful and important classes. This chapter discusses only the most useful and important classes.
Other classes do exist within the <filename>meta/classes</filename> Other classes do exist within the <filename>meta/classes</filename>
directory in the directory in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
You can reference the <filename>.bbclass</filename> files directly You can reference the <filename>.bbclass</filename> files directly
for more information. for more information.
</para> </para>
<section id='ref-classes-base'> <section id='ref-classes-base'>