Joshua Lock <[email protected]> writes: > On Sat, 2011-04-02 at 11:29 +0200, Esben Haabendal wrote: >> Esben Haabendal <[email protected]> writes: >> >> > Trying to figure out the expected behavior of variable assignments. >> > >> > FOO = bar >> > BAR_bar = 1 >> > BAR_${FOO} = 2 >> > BAR_bar = 3 >> > BAR_${FOO} = 4 >> > BAR_bar = 5 >> > >> > gives >> > >> > BAR_bar = "4" >> > >> > Where/when is the variable names being expanded? >> > >> > And wouldn't it make more sense if variable names were expanded >> > immediately, so that the above code would produce BAR_bar="5" ? >> > I at least would find it less surprising. >> > >> > Of-course, this would be a change in semantics, but the fallout might be >> > minimal, and it should be possible to check for it given specific >> > meta-data. >> >> Hmm... Of-course, all the FILES|SECTION|RDEPENDS|RRECOMMENDS_${PN}* in >> bitbake.conf actually on the current semantics. >> >> Perhaps it would make sense to add a new syntax for using immediate >> expansion in the variable name, fx. >> >> BAR_$${FOO} = "6", which would then assign "6" to the variable name >> expanded immediately. > > BitBake has syntax for immediate variable expansion: > http://bitbake.berlios.de/manual/ch02.html#id868911
Yes, I am aware of that. But that syntax is for immediate expansion of the variable value, not of the variable name. I don't believe the latter has any syntax in current BitBake. /Esben _______________________________________________ Bitbake-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/bitbake-dev
