[Scons-users] dependencies when you define environment variables

Gary Oberbrunner garyo at oberbrunner.com
Wed Jul 18 09:27:48 EDT 2012


On Wed, Jul 18, 2012 at 3:32 AM, TOM TANNER (BLOOMBERG/ LONDON)
<ttanner2 at bloomberg.net> wrote:


> This is quite an issue in Builders where you can't (or at least I can't find a way of) set variables in env['ENV'] to pass down to the shell


All Builders take construction-env overrides as keyword args at the
end, and all builders use env['ENV'] as the shell env for their
children. So you should be able to do something like this:

e=env[ENV]
e['FOO']='BAR'
env.Command(target, sources, 'mycmd $SOURCES $TARGET', ENV=e)

--
Gary


More information about the Scons-users mailing list