bitbake: bitbake-user-manual: Re-write "Dependencies Internal to the .bb File"
Fixes [YOCTO #10117] Applied a re-write to better clarify the behavior of dependencies. (Bitbake rev: 28bb8ef7f737034055f3485795179cfdcdb9a41f) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
cbf8516c08
commit
96a861eb02
|
@ -1848,44 +1848,48 @@
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
addtask printdate after do_fetch before do_build
|
addtask printdate after do_fetch before do_build
|
||||||
</literallayout>
|
</literallayout>
|
||||||
In this example, the <filename>printdate</filename> task is
|
In this example, the <filename>do_printdate</filename>
|
||||||
depends on the completion of the <filename>do_fetch</filename>
|
task depends on the completion of the
|
||||||
|
<filename>do_fetch</filename> task, and the
|
||||||
|
<filename>do_build</filename> task depends on the
|
||||||
|
completion of the <filename>do_printdate</filename>
|
||||||
task.
|
task.
|
||||||
And, the <filename>do_build</filename> depends on the completion
|
<note><para>
|
||||||
of the <filename>printdate</filename> task.
|
For a task to run, it must be a direct or indirect
|
||||||
<note>
|
dependency of some other task that is scheduled to
|
||||||
Recipes are built by having their
|
run.</para>
|
||||||
<filename>do_build</filename> (not to be confused with
|
|
||||||
<filename>do_compile</filename>) tasks executed.
|
<para>For illustration, here are some examples:
|
||||||
For a task to run when a recipe is built, the task must
|
|
||||||
therefore be a direct or indirect dependency of
|
|
||||||
<filename>do_build</filename>.
|
|
||||||
For illustration, here are some examples:
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
The directive
|
The directive
|
||||||
<filename>addtask mytask before do_build</filename>
|
<filename>addtask mytask before do_configure</filename>
|
||||||
causes <filename>mytask</filename> to run when the
|
causes <filename>do_mytask</filename> to run before
|
||||||
recipe is built.
|
<filename>do_configure</filename> runs.
|
||||||
In this example, <filename>mytask</filename> is run
|
Be aware that <filename>do_mytask</filename> still only
|
||||||
at an unspecified time relative to other tasks within
|
runs if its <link linkend='checksums'>input checksum</link>
|
||||||
the recipe, since <filename>after</filename> is not used.
|
has changed since the last time it was run.
|
||||||
|
Changes to the input checksum of
|
||||||
|
<filename>do_mytask</filename> also indirectly cause
|
||||||
|
<filename>do_configure</filename> to run.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
The directive
|
The directive
|
||||||
<filename>addtask mytask after do_configure</filename>
|
<filename>addtask mytask after do_configure</filename>
|
||||||
by itself does not cause <filename>mytask</filename>
|
by itself never causes <filename>do_mytask</filename>
|
||||||
to run when the recipe is built.
|
to run.
|
||||||
The task can still be run manually using the following:
|
<filename>do_mytask</filename> can still be run manually
|
||||||
|
as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake <replaceable>recipe</replaceable> -c mytask
|
$ bitbake <replaceable>recipe</replaceable> -c mytask
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<filename>mytask</filename> could also be declared as
|
Declaring <filename>do_mytask</filename> as a dependency
|
||||||
a dependency of some other task.
|
of some other task that is scheduled to run also causes
|
||||||
Regardless, the task is run after
|
it to run.
|
||||||
|
Regardless, the task runs after
|
||||||
<filename>do_configure</filename>.
|
<filename>do_configure</filename>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist></para>
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue