[Scons-users] Action commands

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Jan 16 07:26:25 EST 2017


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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170116/3b516de1/attachment.html>


More information about the Scons-users mailing list