[Scons-users] env[X'] and signatures

Fred Wright fw at fwright.net
Mon Dec 26 13:42:06 EST 2016


On Mon, 26 Dec 2016, William Blevins wrote:

> I do also, but at one point, I got the impression (from him) that this
> changed in SCons. I don't think this was supported implicitly, but it could
> have been supported explicitly by adding the variable to the hash or other.
> This is why I wanted to know the SCons version that "broke" this.

If the details of this behavior are well-documented, it's certainly
escaped me. :-)

I've actually been burned recently in both directions by this issue.  On
the one hand, I found that if LIBPATH isn't set up the same way for
cleaning as it is for building (*), then some targets don't get cleaned.
On the other hand, a Python builder taking an environment variable as an
input doesn't get rerun if the value changes.  To fix that, I added a
Value() node derived from the environment variable, and added it as an
explicit dependency.

* The Configure section is so slow and verbose that it's useful to
suppress most of it when "cleaning or helping".  But one has to be careful
not to perturb the definitions of cleanable targets.

Fred Wright

> On Dec 26, 2016 3:44 AM, "Tom Tanner (BLOOMBERG/ LONDON)" <
> ttanner2 at bloomberg.net> wrote:
>
> > I think he's talking the situation where you set env.env['MYVAR'], which
> > means for something like this
> >
> > env.env['MYVAR'] = 'Fish'
> > env.Command('some_random_script < $SOURCE > $TARGET', sources, targets)
> >
> > and 'some_random_script' does
> >
> > #!/bin/sh
> > echo $MYVAR
> >
> > and you then change the SConscript file and set env.env['MYVAR'] to
> > 'Chips', it won't cause a rebuild.
[...]



More information about the Scons-users mailing list