diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2016-08-12 09:17:02 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:22:59 +0100 |
commit | 96a861eb0211ce66eab11322d474f1a8f5f0312a (patch) | |
tree | b4cd8ac018dfe93844e6a83195a81d36d3a9bf46 /bitbake | |
parent | cbf8516c083ebf7fc4b1a3018702b78989f64f1f (diff) | |
download | poky-96a861eb0211ce66eab11322d474f1a8f5f0312a.tar.gz |
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 3d9234cba6..5df00050ce 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | |||
@@ -1848,44 +1848,48 @@ | |||
1848 | <literallayout class='monospaced'> | 1848 | <literallayout class='monospaced'> |
1849 | addtask printdate after do_fetch before do_build | 1849 | addtask printdate after do_fetch before do_build |
1850 | </literallayout> | 1850 | </literallayout> |
1851 | In this example, the <filename>printdate</filename> task is | 1851 | In this example, the <filename>do_printdate</filename> |
1852 | depends on the completion of the <filename>do_fetch</filename> | 1852 | task depends on the completion of the |
1853 | <filename>do_fetch</filename> task, and the | ||
1854 | <filename>do_build</filename> task depends on the | ||
1855 | completion of the <filename>do_printdate</filename> | ||
1853 | task. | 1856 | task. |
1854 | And, the <filename>do_build</filename> depends on the completion | 1857 | <note><para> |
1855 | of the <filename>printdate</filename> task. | 1858 | For a task to run, it must be a direct or indirect |
1856 | <note> | 1859 | dependency of some other task that is scheduled to |
1857 | Recipes are built by having their | 1860 | run.</para> |
1858 | <filename>do_build</filename> (not to be confused with | 1861 | |
1859 | <filename>do_compile</filename>) tasks executed. | 1862 | <para>For illustration, here are some examples: |
1860 | For a task to run when a recipe is built, the task must | ||
1861 | therefore be a direct or indirect dependency of | ||
1862 | <filename>do_build</filename>. | ||
1863 | For illustration, here are some examples: | ||
1864 | <itemizedlist> | 1863 | <itemizedlist> |
1865 | <listitem><para> | 1864 | <listitem><para> |
1866 | The directive | 1865 | The directive |
1867 | <filename>addtask mytask before do_build</filename> | 1866 | <filename>addtask mytask before do_configure</filename> |
1868 | causes <filename>mytask</filename> to run when the | 1867 | causes <filename>do_mytask</filename> to run before |
1869 | recipe is built. | 1868 | <filename>do_configure</filename> runs. |
1870 | In this example, <filename>mytask</filename> is run | 1869 | Be aware that <filename>do_mytask</filename> still only |
1871 | at an unspecified time relative to other tasks within | 1870 | runs if its <link linkend='checksums'>input checksum</link> |
1872 | the recipe, since <filename>after</filename> is not used. | 1871 | has changed since the last time it was run. |
1872 | Changes to the input checksum of | ||
1873 | <filename>do_mytask</filename> also indirectly cause | ||
1874 | <filename>do_configure</filename> to run. | ||
1873 | </para></listitem> | 1875 | </para></listitem> |
1874 | <listitem><para> | 1876 | <listitem><para> |
1875 | The directive | 1877 | The directive |
1876 | <filename>addtask mytask after do_configure</filename> | 1878 | <filename>addtask mytask after do_configure</filename> |
1877 | by itself does not cause <filename>mytask</filename> | 1879 | by itself never causes <filename>do_mytask</filename> |
1878 | to run when the recipe is built. | 1880 | to run. |
1879 | The task can still be run manually using the following: | 1881 | <filename>do_mytask</filename> can still be run manually |
1882 | as follows: | ||
1880 | <literallayout class='monospaced'> | 1883 | <literallayout class='monospaced'> |
1881 | $ bitbake <replaceable>recipe</replaceable> -c mytask | 1884 | $ bitbake <replaceable>recipe</replaceable> -c mytask |
1882 | </literallayout> | 1885 | </literallayout> |
1883 | <filename>mytask</filename> could also be declared as | 1886 | Declaring <filename>do_mytask</filename> as a dependency |
1884 | a dependency of some other task. | 1887 | of some other task that is scheduled to run also causes |
1885 | Regardless, the task is run after | 1888 | it to run. |
1889 | Regardless, the task runs after | ||
1886 | <filename>do_configure</filename>. | 1890 | <filename>do_configure</filename>. |
1887 | </para></listitem> | 1891 | </para></listitem> |
1888 | </itemizedlist> | 1892 | </itemizedlist></para> |
1889 | </note> | 1893 | </note> |
1890 | </para> | 1894 | </para> |
1891 | </section> | 1895 | </section> |