On Mon, Nov 26, 2012 at 9:19 PM, Gary Oberbrunner <[email protected]>wrote:

> There was a discussion of this a year or two ago.  Steven and I worked out
> a scheme, but the part we got stuck on is that tools modify the
> environment.  People expect, for instance, if they say
> env.Append(CXXFLAGS='-xyz') that that will actually go at the end.  Making
> that work if the tool hasn't set up its default CXXFLAGS yet seems very
> difficult.


Why defaultdict() subclass can't be a solution for this particular use
case? Tool specifies default, if no CXXFLAGS are set when somebody appends,
these flags are initialized with defaults.

BTW, if we are talking about tool management, it would help greatly for
analysis and debugging if env:
1. kept reference about "which tool contributed which variable"
2. gave a signal (probe) when variable is first accessed (to inspect if the
variable is used in dependency graph construction phase)

This will allow to dump information about "which commands are contributed
by which tools" and build visualization "how SCons environment is
constructed".
-- 
anatoly t.
_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to