Enhance Builders to be able to control the execution environment
This issue was originally created at: 2012-07-19 08:11:14.
This issue was reported by: thosrtanner.
thosrtanner said at 2012-07-19 08:11:14
Basically, there's situation where we have tools that require certain parameters to be passed in as environment variables. which ends up in such action commands as
['TOOL_VARIABLE=${SOURCE.dir} $TOOL $SOURCE $TARGET']
Firstly, this confuses the dependency tracking of scons no end as it doesn't recognise $TOOL being a dependency of the rule, so you have to add it manually in the emitter
Secondly, it makes for very unreadable command lines
Thirdly, there's circumstances in which this is quite tedious (for instance, if you are inheriting from one of the supplied tools but your version needs an extra env variable).
Fourthly it means you get a lot of global data and the possibility of clashes of 2 tools happen to need 2 different settings of the same environment varable.
So basically it'd be really nice if env['ENV'] (aka the "execution environment") could be controlled in the emitter, and the values you set in there could be used in the hash for the dependencies.