[Scons-users] Action commands

Bill Deegan bill at baddogconsulting.com
Mon Jan 16 11:40:44 EST 2017


Try Action() without the env.
Assuming you're using the created object later and not just calling action
by itself?

-Bill

On Mon, Jan 16, 2017 at 4:26 AM, Tom Tanner (BLOOMBERG/ LONDON) <
ttanner2 at bloomberg.net> wrote:

> I was quite surprised recently to find that if you (attempt to) pass it
> environment overrides it ignores them
>
> so if you do
>
> env.Command('$THIS blah', THIS='echo')
>
> it does what is expected.
>
> but
>
> env.Action('$THIS blah', THIS='echo')
>
> I've had occasion to want to do the latter when writing a Builder, or at
> least it has appeared that's what I've wanted to do, when one of env
> variables in the Action command is something that actually processes
> another environment variable. And I can't do this:
>
> def generator(source, target, env, for_signature):
> env['THIS'] = 'echo'
>
> because it corrupts env. And I tried cloning env inside the generator and
> returning a cloned_env.Action. That did not work out well.
>
> So what can I do ?
>
> _______________________________________________
> 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/20170116/e7eafa65/attachment.html>


More information about the Scons-users mailing list