[oe] Using EXTERNALSRC in practice

Anders Darander anders at chargestorm.se
Tue Jun 21 12:42:57 UTC 2016


* Ulf Samuelsson <openembedded at emagii.com> [160621 13:24]:

> Den 2016-06-21 kl. 09:27, skrev Jérémy Rosen:

> > ${THISDIR} should be what you want, if I understand correctly...

> Tried that, but that ended up in the build tree.

> The <kernel>.bb file is located in the build tree, and the <kernel>.bbappend
> is somewhere else.
> Don't ask me why, LOL...

> I need the directory of the bbappend file.

Yes, ${THISDIR} is exactly what you're looking for. Your issue is that
you're probably using it like:

SOMEVAR = "${THISDIR}/.."

Using bitbake and OE, all variables on the right hand side are expanded
and evaluated at towards the end of the processing. At that point in
time, THISDIR is correct to point to the directory with the .bb-file.

You need to immediately expand ${THISDIR} by using:

SOMEVAR := "${THISDIR}/.."

See for instance the discussion at
http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-FILESEXTRAPATHS

Cheers,
Anders
-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB



More information about the Openembedded-devel mailing list