On Sun, 2014-05-11 at 00:31 +0200, pet...@technux.se wrote: > 2014-05-10 18:58 skrev Khem Raj: > > > On Sat, May 10, 2014 at 1:05 AM, Petter Mabäcker <pet...@technux.se> > > wrote: > > > >> +FILESEXTRAPATHS_prepend := "${THISDIR}/systemtap:" > > > > would something like > > > > FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:" > > > > avoid the prepend and immediate evaluation > > I guess someone with deep bitbake knowledge can answer this better. But > as far as I understand, you should always use immediate evaluation when > using THISDIR, to be extra safe. Not sure if it's more safe to use > FILE_DIRNAME if you want to avoid immediate expanding when using > FILESEXTRAPATHS? > > The bitbake documentations says: > > "The operators "_append" and "_prepend" differ from the operators ".=" > and "=." in that they are deferred until after parsing completes rather > than being immediately applied." > > Not sure if above means that "=." will also immediately expand > variables or not?
They're not. > Personally I have always used FILESEXTRAPATHS_prepend := > "${THISDIR}/<somename>:" like the yocto documentation recommends. But > sure if you can avoid immediate expanding in FILESEXTRPATHS, that would > mean a tiny optimization. In that case perhaps the documentation should > be updated as well. Looking in meta-layer both methods seems to be used. What Khem means is that in the case we know we're in the .bb file directory, we can use FILE_DIRNAME instead of using :=. Why? FILE_DIRNAME is defined as: conf/bitbake.conf:FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}" FILE will point to the .bb file. Cheers, Richard -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core