ref-manual: Updated the DEPENDS variable description

Fixes [YOCTO #10298]

Added a better front part description to the variable.

(From yocto-docs rev: ce8a093235aa78761fde66f345f993ab7cfac6c6)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2016-09-22 09:07:59 -07:00 committed by Richard Purdie
parent b8ad433ff3
commit cd2a26c018
1 changed files with 42 additions and 15 deletions

View File

@ -2787,28 +2787,55 @@
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Lists a recipe's build-time dependencies
(i.e. other recipe files).
The system ensures that all the dependencies listed
have been built and have their contents in the appropriate
sysroots before the recipe's configure task is executed.
Lists a recipe's build-time dependencies.
These dependencies are on other recipes whose
contents (e.g. headers and shared libraries) are needed
by the recipe at build time.
</para>
<para>
Consider this simple example for two recipes named "a" and
"b" that produce similarly named packages.
In this example, the <filename>DEPENDS</filename>
statement appears in the "a" recipe:
As an example, consider a recipe <filename>foo</filename>
that contains the following assignment:
<literallayout class='monospaced'>
DEPENDS = "b"
DEPENDS = "bar"
</literallayout>
Here, the dependency is such that the
The practical effect of the previous assignment is that
all files installed by <filename>bar</filename> will be
available in the appropriate staging sysroot (i.e.
<link linkend='var-STAGING_DIR'><filename>STAGING_DIR*</filename></link>
variables) by the time the
<link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
task for recipe "a" depends on the
task for <filename>foo</filename> runs.
This mechanism is implemented by having
<filename>do_configure</filename> depend on the
<link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
task of recipe "b".
This means anything that recipe "b" puts into sysroot
is available when recipe "a" is configuring itself.
task of each recipe listed in <filename>DEPENDS</filename>
through a
<filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
declaration in the
<link linkend='ref-classes-base'><filename>base</filename></link>
class.
<note>
It seldom is necessary to reference, for example,
<filename>STAGING_DIR_HOST</filename> explicitly.
The standard classes and build-related variables are
configured to automatically use the appropriate staging
sysroots.
</note>
As another example, <filename>DEPENDS</filename> can also
be used to add utilities that run on the build machine
during the build.
For example, a recipe that makes use of a code generator
built by the recipe <filename>codegen</filename> might have
the following:
<literallayout class='monospaced'>
DEPENDS = "codegen-native"
</literallayout>
For more information, see the
<link linkend='ref-classes-native'><filename>native</filename></link>
class and the
<link linkend='var-EXTRANATIVEPATH'><filename>EXTRANATIVEPATH</filename></link>
variable.
<note>
<title>Notes</title>
<itemizedlist>