ref-manual: Updated the MLPREFIX variable description.

Fixes [YOCTO #10197]

Provided better examples and a bit of a historical note.

(From yocto-docs rev: 5845aadcc4e6932abde4ce7c74834c0f2a9fb806)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2016-09-01 14:16:52 -07:00 committed by Richard Purdie
parent 2c38cc69bb
commit 4b8e7d8cca
1 changed files with 33 additions and 0 deletions

View File

@ -7931,6 +7931,39 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-BPN'><filename>BPN</filename></link> variable).
<filename>MLPREFIX</filename> gets set when a prefix has been
added to <filename>PN</filename>.
<note>
The "ML" in <filename>MLPREFIX</filename> stands for
"MultiLib".
This representation is historical and comes from
a time when <filename>nativesdk</filename> was a suffix
rather than a prefix on the recipe name.
When <filename>nativesdk</filename> was turned into a
prefix, it made sense to set
<filename>MLPREFIX</filename> for it as well.
</note>
</para>
<para>
To help understand when <filename>MLPREFIX</filename>
might be needed, consider when
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link>
is used to provide a <filename>nativesdk</filename> version
of a recipe in addition to the target version.
If that recipe declares build-time dependencies on tasks in
other recipes by using
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
then a dependency on "foo" will automatically get rewritten
to a dependency on "nativesdk-foo".
However, dependencies like the following will not get
rewritten automatically:
<literallayout class='monospaced'>
do_foo[depends] += "<replaceable>recipe</replaceable>:do_foo"
</literallayout>
If you want such a dependency to also get transformed,
you can do the following:
<literallayout class='monospaced'>
do_foo[depends] += "${MLPREFIX}<replaceable>recipe</replaceable>:do_foo"
</literallayout>
</para>
</glossdef>
</glossentry>