On 21.10.2013 13:13, [email protected] wrote:
Hi Dirk,
[email protected] 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
_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev