<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"><<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>></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"><<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>> +do_compile () {<br>
> + for field in ${OS_RELEASE_FIELDS}; do<br>
> + if eval "test -n \"\$$field\""; then<br>
> + eval "printf \"%s=%s\n\" \"\$field\" \"\$$field\""<br>
> + fi<br>
> + done >os-release<br>
> +}<br>
> +do_compile[vardeps] += "${OS_RELEASE_FIELDS}"<br>
<br>
</div></div>Isn'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>