<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 13, 2013 at 8:12 AM, Chris Larson <span dir="ltr">&lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.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 class="im"><div class="gmail_quote">On Fri, Dec 13, 2013 at 8:08 AM, Martin Jansa <span dir="ltr">&lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.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><div>&gt; +do_compile () {<br>
&gt; +    for field in ${OS_RELEASE_FIELDS}; do<br>
&gt; +        if eval &quot;test -n \&quot;\$$field\&quot;&quot;; then<br>
&gt; +            eval &quot;printf \&quot;%s=%s\n\&quot; \&quot;\$field\&quot; \&quot;\$$field\&quot;&quot;<br>
&gt; +        fi<br>
&gt; +    done &gt;os-release<br>
&gt; +}<br>
&gt; +do_compile[vardeps] += &quot;${OS_RELEASE_FIELDS}&quot;<br>
<br>
</div></div>Isn&#39;t this dependency picked automatically?<br>
<div></div></blockquote></div><br></div>No, this is expanded, so this adds the dependency on the variables whose names are in the OS_RELEASE_FIELDS variable, not just on OS_RELEASE_FIELDS itself. Due to the use of eval, bitbake doesn’t know we’re using the iterated values as variable names.</blockquote>

</div><br>To put it perhaps more clearly and succinctly, do_compile[vardeps] += “OS_RELEASE_FIELDS” would be unnecessary, do_compile[vardeps] += “${OS_RELEASE_FIELDS}” isn’t :)<br>-- <br>Christopher Larson<br>clarson at kergoth dot com<br>

Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics
</div></div>