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 646f6744e6..857f8b279c 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -1670,6 +1670,40 @@ task. And, the do_build depends on the completion of the printdate task. + + Recipes are built by having their + do_build (not to be confused with + do_compile) tasks executed. + For a task to run when a recipe is built, the task must + therefore be a direct or indirect dependency of + do_build. + For illustration, here are some examples: + + + The directive + addtask mytask before do_build + causes mytask to run when the + recipe is built. + In this example, mytask is run + at an unspecified time relative to other tasks within + the recipe, since "after" is not used. + + + The directive + addtask mytask after do_configure + by itself does not cause mytask + to run when the recipe is built. + The task can still be run manually using the following: + + $ bitbake recipe -c mytask + + mytask could also be declared as + a dependency of some other task. + Regardless, the task is run after + do_configure. + + +