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> <glossdef>
<para role="glossdeffirst"> <para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Lists a recipe's build-time dependencies Lists a recipe's build-time dependencies.
(i.e. other recipe files). These dependencies are on other recipes whose
The system ensures that all the dependencies listed contents (e.g. headers and shared libraries) are needed
have been built and have their contents in the appropriate by the recipe at build time.
sysroots before the recipe's configure task is executed.
</para> </para>
<para> <para>
Consider this simple example for two recipes named "a" and As an example, consider a recipe <filename>foo</filename>
"b" that produce similarly named packages. that contains the following assignment:
In this example, the <filename>DEPENDS</filename>
statement appears in the "a" recipe:
<literallayout class='monospaced'> <literallayout class='monospaced'>
DEPENDS = "b" DEPENDS = "bar"
</literallayout> </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> <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> <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
task of recipe "b". task of each recipe listed in <filename>DEPENDS</filename>
This means anything that recipe "b" puts into sysroot through a
is available when recipe "a" is configuring itself. <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> <note>
<title>Notes</title> <title>Notes</title>
<itemizedlist> <itemizedlist>