<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 1:24 PM, Peter Seebach <span dir="ltr"><<a href="mailto:peter.seebach@windriver.com" target="_blank">peter.seebach@windriver.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1wy">PREFIX = "${@['', (d.getVar("BBEXTENDVARIANT", True) or "") +<br>
'-'][(d.getVar("BBEXTENDVARIANT", True) or "") != ""]}"<br>
<br>
and then use ${PREFIX}${FOO}.<br>
<br>
... wait, that's horrible. What if I could write:<br>
@{BBEXTENDVARIANT+@{BBEXTENDVARIANT}-}<br>
instead? That's practically legible by comparison. Or, with the new<br>
bonus features,</div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra" style>BBEXTENDVARIANT ??= ""</div>PREFIX = "${@BBEXTENDVARIANT + '-' if BBEXTENDVARIANT else ''}"<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Which leverages the python inline if statement syntax, coupled with the bitbake feature which allows you to reference variables as though they were python variables.<br>
-- <br>Christopher Larson</div></div>