[Scons-users] env[X'] and signatures
William Blevins
wblevins001 at gmail.com
Mon Dec 26 14:43:17 EST 2016
It makes sense that the env should be the same for building and cleaning
because the dependency tree is based on the environment. Explicit library
dependencies must come from where libraries are listed. The value node is
admittedly more obscure.
Glad you figured it out.
On Dec 26, 2016 1:52 PM, "Fred Wright" <fw at fwright.net> wrote:
>
> 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.
> [...]
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161226/ba364bbd/attachment.html>
More information about the Scons-users
mailing list