[Scons-dev] SConstruct processing order

anatoly techtonik techtonik at gmail.com
Mon Dec 3 14:09:10 EST 2012


On Mon, Nov 26, 2012 at 9:19 PM, Gary Oberbrunner <garyo at oberbrunner.com>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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20121203/4a14719e/attachment.htm>


More information about the Scons-dev mailing list