<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 30, 2015 at 7:28 AM, Mike Crowe <span dir="ltr">&lt;<a href="mailto:mac@mcrowe.com" target="_blank">mac@mcrowe.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":13j" class="a3s" style="overflow:hidden">oe-core 51540b64f62234c145fc32cfa3fbbaaebbeece08 altered libcap.inc (at the<br>
time) to append to EXTRA_OEMAKE rather than assign to it. The default value<br>
for EXTRA_OEMAKE contains &quot;-e&quot;. This means that the change caused &quot;-e&quot; to<br>
be passed to make for the first time.<br>
<br>
Unfortunately passing &quot;-e&quot; subtly changes the behaviour of libcap&#39;s<br>
Make.Rules under recursive make when prefix=&quot;&quot; (which it is for us since<br>
we&#39;re using meta-micro.) Here&#39;s a snippet of Make.rules:<br>
<br>
ifdef prefix<br>
exec_prefix=$(prefix)<br>
lib_prefix=$(exec_prefix)<br>
inc_prefix=$(lib_prefix)<br>
man_prefix=$(prefix)/share<br>
else<br>
prefix=/usr<br>
exec_prefix=<br>
lib_prefix=$(exec_prefix)<br>
inc_prefix=$(prefix)<br>
man_prefix=$(prefix)/share<br>
endif<br>
<br>
Without &quot;-e&quot; the prefix comes from the command line in both the parent and<br>
submakes. This takes precedence over any attempt to reassign it with a<br>
simple &quot;=&quot; operation so the headers are correctly installed in (empty<br>
string)/include.<br>
<br>
With &quot;-e&quot; the prefix still comes from the command line in the parent make<br>
but from the environment in the submake. The attempt to assign it fails in<br>
the parent make as before, but not in the submake so the headers are<br>
installed incorrectly in /usr/include.<br>
<br>
In all four cases the &quot;ifdef prefix&quot; else clause is executed.<br>
<br>
The quick-and-easy fix for this is simply to pass prefix=&quot;${prefix}/&quot; but<br>
it&#39;s really just working around the problem.<br>
<br>
Alternatively we could go back to assigning EXTRA_OEMAKE rather than<br>
appending to it.<br>
<br>
What would be the preferred course of action?</div></blockquote></div><br>Given our use of make -e (with MAKEFLAGS= to try to prevent it from flowing into submakes) was always a hack to try to let things &quot;just work&quot;, I think wherever possible we should stop relying on it, and explicitly pass everything the way that particular make-based buildsystem expects, personally. Better to be explicit than to rely on implicit &quot;magic&quot;. Further, that behavior encourages recipe maintainers to not even read the buildsystem of the project they&#39;re creating a recipe for, which often leads to problems down the road..<br>-- <br><div class="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>