summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-10-10 11:19:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-11 08:51:22 +0100
commit96b9007053c2519d7462b2360c231a367719995a (patch)
tree243f024ca0e911fbac393a6343c9cafa92843d7a /documentation
parent2cd01257c8551533f23b0ff14e9cbb6ca53c8357 (diff)
downloadpoky-96b9007053c2519d7462b2360c231a367719995a.tar.gz
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 <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml68
1 files changed, 58 insertions, 10 deletions
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 @@
3342 If you can't use the <filename>bin_package</filename> 3342 If you can't use the <filename>bin_package</filename>
3343 class, you need to be sure you are doing the following: 3343 class, you need to be sure you are doing the following:
3344 <itemizedlist> 3344 <itemizedlist>
3345 <listitem><para>Create a recipe where the 3345 <listitem><para>
3346 Create a recipe where the
3347 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
3348 and
3349 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
3350 tasks do nothing:
3351 It is usually sufficient to just not define these
3352 tasks in the recipe, because the default
3353 implementations do nothing unless a Makefile is
3354 found in
3355 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>.
3356 </para>
3357
3358 <para>If
3359 <filename>${S}</filename> might contain a Makefile,
3360 or if you inherit some class that replaces
3346 <filename>do_configure</filename> and 3361 <filename>do_configure</filename> and
3347 <filename>do_compile</filename> tasks do nothing: 3362 <filename>do_compile</filename> with custom
3363 versions, then you can use the
3364 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>noexec</filename></ulink><filename>]</filename>
3365 flag to turn the tasks into no-ops, as follows:
3348 <literallayout class='monospaced'> 3366 <literallayout class='monospaced'>
3349 do_configure[noexec] = "1" 3367 do_configure[noexec] = "1"
3350 do_compile[noexec] = "1" 3368 do_compile[noexec] = "1"
3351 </literallayout> 3369 </literallayout>
3352 Alternatively, you can make these tasks an empty 3370 Unlike
3353 function. 3371 <ulink url='&YOCTO_DOCS_BB_URL;#deleting-a-task'><filename>deleting the tasks</filename></ulink>,
3372 using the flag preserves the dependency chain from
3373 the
3374 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>,
3375 and
3376 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
3377 tasks to the
3378 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
3379 task.
3354 </para></listitem> 3380 </para></listitem>
3355 <listitem><para>Make sure your 3381 <listitem><para>Make sure your
3356 <filename>do_install</filename> task installs the 3382 <filename>do_install</filename> task installs the
3357 binaries appropriately. 3383 binaries appropriately.
3358 </para></listitem> 3384 </para></listitem>
3359 <listitem><para>Ensure that you set up 3385 <listitem><para>Ensure that you set up
3360 <filename>FILES</filename> (usually 3386 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
3361 <filename>FILES_${PN}</filename>) to point to the 3387 (usually
3362 files you have installed, which of course depends 3388 <filename>FILES_${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>)
3363 on where you have installed them and whether 3389 to point to the files you have installed, which of
3364 those files are in different locations than the 3390 course depends on where you have installed them
3365 defaults. 3391 and whether those files are in different locations
3392 than the defaults.
3366 </para></listitem> 3393 </para></listitem>
3394 <listitem><para>
3395 Using
3396 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
3397 is a good idea even for components distributed in
3398 binary form, and is often necessary for shared
3399 libraries.
3400 For a shared library, listing the library
3401 dependencies in
3402 <filename>DEPENDS</filename> makes sure that the
3403 libraries are available in the staging sysroot when
3404 other recipes link against the library, which might
3405 be necessary for successful linking.</para>
3406
3407 <para>Using <filename>DEPENDS</filename> also
3408 allows runtime dependencies between packages to be
3409 added automatically.
3410 See the
3411 "<ulink url='&YOCTO_DOCS_REF_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
3412 section in the Yocto Project Reference Manual for
3413 more information.
3414 </para></listitem>.
3367 </itemizedlist> 3415 </itemizedlist>
3368 </para> 3416 </para>
3369 </section> 3417 </section>