[Scons-dev] Calling PseudoBuilder from an emitter function from a Builder with OverrideEnvironment looses overrides

Dirk Bächle tshortik at gmx.de
Mon Oct 21 07:27:23 EDT 2013


On 21.10.2013 13:13, andreas.ames at de.transport.bombardier.com wrote:

>

> Hi Dirk,

>

> scons-dev-bounces at scons.org schrieb am 21.10.2013 12:40:27:

>

> > as a first thought on this: I wouldn't expect this to work at all,

> > because it shouldn't be necessary to call any kind of Builder from

> an Emitter.

> > Can you possibly tell us a bit more about where this setup comes

> > from, or why you need to do it like this?

>

> it's well possible that I'm abusing the PseudoBuilder concept here.

> We've got a convention here that our own environment variables are

> all prefixed with a common short string to avoid clashes with names

> predefined by scons. So we have created a PseudoBuilder which takes

> the unadorned variable name and adds the common prefix to look up the

> variable in the environment. Thus I used this PseudoBuilder to lookup

> a variable within the emitter because I didn't know about the "No

> Builders in emitters" rule.

>


I don't think that there are (or should be) any fixed rules about how to
use the SCons classes. As long as it works for you, it's okay. I just
wouldn't have come up with this idea in the first place, because an
Emitter is supposed to be only transforming (or emitting) file
names...but not actually building the physical instances behind them.


> The workaround was trivial and I will transform my lookup

> PseudoBuilder into a normal Python function which seems more adequate

> (and efficient) anyway.

>


Sounds good.

Regards and "Happy SConsing",

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20131021/8b1558d2/attachment-0001.html>


More information about the Scons-dev mailing list