[Scons-users] Undocumented env override feature

RW garlicbready at googlemail.com
Thu Aug 31 16:41:42 EDT 2017


Hi,
Just to ask, I've noticed that there might be a feature that's quite useful
but not documented in the user manual (or at least non obvious). I just
thought to check before adding in a change to the user docs.

If you have a single Construction Environment but want to launch multiple
builders with different parameters per call.
I've noticed it's possible to override env variables by passing them into
the builder call

env = Environment(tools = ['Tool1'])
env.Tool1('target1.txt', 'source1.txt', Tool1_Param="Example1")
env.Tool1('target1.txt', 'source1.txt', Tool1_Param="Example2")

>From what I can gather in this scenario the env is cloned / modified per
builder call, so that each builder instance gets a different env value when
running.

http://scons.1086193.n5.nabble.com/custom-builder-additional-arguments-td26701.html

Many Thanks
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170831/6ca1bfab/attachment.html>


More information about the Scons-users mailing list