[Scons-users] Fwd: Support for automatic fetching of environment build variables

Dirk Bächle tshortik at gmx.de
Sun Nov 10 16:29:54 EST 2013


Hi Karlish,

On 10.11.2013 19:22, Kalrish Bäakjen wrote:

> Hello.

>

> With Autotools-based builds, it is possible to set CC, CFLAGS,

> LDFLAGS... and the rest of the family on the environment; the various

> Makefiles will automatically handle them. With SCons, however, that

> functionality has to be added by hand. It's not something tedious, as

> can be seen in the following example:

>

> import os

> for V in [ 'CXX' , 'CPPFLAGS' , 'CXXFLAGS' , 'LDFLAGS' ]:

> if V in os.environ:

> DefaultEnvironment()[ V ] = os.environ[ V ]

>

>

> but I think it would be desirable to add it as a SCons built-in.


leaving out this functionality was one of SCons' major design choices.
While it may appear to be convenient to have variables imported from the
shell environment automatically, it doesn't guarantee repeatable builds.
Your builds suddenly deliver different results, depending on how the
current user has set up his shell variables.
For people having to manage large and complicated builds on various
platforms this is definitely not what they want.
That's why you need to pull in shell variables explicitly...if you think
you really have to. ;)

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131110/6be405a2/attachment.html


More information about the Scons-users mailing list