[Scons-users] Questions about tool selection

Dirk Bächle tshortik at gmx.de
Thu Jun 13 03:04:44 EDT 2013


Hi Andrew,

On 12.06.2013 20:02, Andrew C. Morrow wrote:

>

> Thanks Bill -

>

> I guess I really have several issues: one practical, the rest

> theoretical. Lets leave the theoretical ones alone for now...

>

> The practical one, as you may have guessed, is how to get sunlink out

> of the default tools. Certainly I could exactly enumerate the tools I

> need. However, the current Environment setup in this project uses

> tools=['default']. I'm very reluctant to change that, because the

> application of 'default' causes a large number of changes to the

> Environment, and whatever I do to evict sunlink needs to be backported

> to at least one stable release. So I'd like to make the removal of

> sunlink as surgical as possible and not make any other unknown changes

> to the Environment as a result of changing from 'default' to an

> explicit list. At least not right now.

>

> One thought that occurred to me overnight was that if I could somehow

> get a list of what tools 'default' expanded to before constructing the

> Environment, then I could filter sunlink out of that list:

>

> env = Environment(tools=[tool for tool in

> MagicallyGetWhatDefaultMeans() if tool not in ['sunlink']] + [my,

> custom, tool, list])

>


you could also try to load the default tools first with

env = Environment() # finds all default stuff

and then, on top of that, load the specific Tool you actually want, like

env.Tool('mylink')

. Most of the C/C++ Tools are directly replacing values in the
Environment, so you could try to overwrite one with the other.
Just as a an idea (untested and not really recommended).

Best regards,

Dirk



More information about the Scons-users mailing list