From 96b9007053c2519d7462b2360c231a367719995a Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 10 Oct 2016 11:19:12 -0700 Subject: dev-manual: Updated "Packaging Externally Produced Binaries" Fixes [YOCTO #10392] People often needlessly put [noexec] on tasks, making the recipes more complicated than they need to be. I updated the first bullet item in this section to more clearly explain how to do this. Also, added a new bullet item to the end to point into the DEPENDS variable for more clarification. (From yocto-docs rev: c61e61c1a5f9524c50bfc26335ea6c2027cafd19) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 68 ++++++++++++++++++---- 1 file changed, 58 insertions(+), 10 deletions(-) (limited to 'documentation') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index bda509e9a0..33faddcca6 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -3342,28 +3342,76 @@ If you can't use the bin_package class, you need to be sure you are doing the following: - Create a recipe where the + + Create a recipe where the + do_configure + and + do_compile + tasks do nothing: + It is usually sufficient to just not define these + tasks in the recipe, because the default + implementations do nothing unless a Makefile is + found in + ${S}. + + + If + ${S} might contain a Makefile, + or if you inherit some class that replaces do_configure and - do_compile tasks do nothing: + do_compile with custom + versions, then you can use the + [noexec] + flag to turn the tasks into no-ops, as follows: do_configure[noexec] = "1" do_compile[noexec] = "1" - Alternatively, you can make these tasks an empty - function. + Unlike + deleting the tasks, + using the flag preserves the dependency chain from + the + do_fetch, do_unpack, + and + do_patch + tasks to the + do_install + task. Make sure your do_install task installs the binaries appropriately. Ensure that you set up - FILES (usually - FILES_${PN}) to point to the - files you have installed, which of course depends - on where you have installed them and whether - those files are in different locations than the - defaults. + FILES + (usually + FILES_${PN}) + to point to the files you have installed, which of + course depends on where you have installed them + and whether those files are in different locations + than the defaults. + + Using + DEPENDS + is a good idea even for components distributed in + binary form, and is often necessary for shared + libraries. + For a shared library, listing the library + dependencies in + DEPENDS makes sure that the + libraries are available in the staging sysroot when + other recipes link against the library, which might + be necessary for successful linking. + + Using DEPENDS also + allows runtime dependencies between packages to be + added automatically. + See the + "Automatically Added Runtime Dependencies" + section in the Yocto Project Reference Manual for + more information. + . -- cgit v1.2.3-54-g00ecf