[Scons-users] possible bug

Dirk Bächle tshortik at gmx.de
Fri May 9 16:30:03 EDT 2014


Hi Tom,

On 09.05.2014 20:59, Tom Tanner (BLOOMBERG/ LONDON) wrote:

> in our build, we have the system set up to give errors if you use a

> variable name which doesn't have an associated value (a few miles away

> from the code right now, and can't remember the option, but basically,

> it's so if you randomly use $CCCFLAGS by mistake, you get get an error

> rather than a surprising build).

>

> However, someone used the TextFile tool recently and discovered that

> if you don't specify SUBST_DICT as a parameter, it gives you an error

> because $SUBST_DICT references an undefined variable.

>

> This seems a little wrong to me, but I'm not sure what the most

> appropriate fix is.

I just checked the sources, and the Texfile/Substfile Builders use the
absence of the SUBST_DICT var meaning "don't substitute anything". As
far as I know, there is no rule in SCons enforcing that all variables
within a Tool have to be initialized...and I, personally, would really
like to keep this flexibility for the framework.


> 1) To change TextFile somehow - but I'm not sure how.

> 2) To provide a global SUBST_DICT set to an empty dictionary

> 3) To provide an empty SUBST_DICT to every instance of TextFile

>

4) Amend your consistency check, allowing SUBST_DICT to not exist (every
rule has its exception! ;) ).

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140509/38697941/attachment.htm


More information about the Scons-users mailing list