[Scons-users] Making some tools run only one at a time

Gary Oberbrunner garyo at oberbrunner.com
Mon Mar 10 15:36:42 EDT 2014


On Mon, Mar 10, 2014 at 3:04 PM, Plunket, Tom
<tom.plunket at aristocrat-inc.com> wrote:

> I wanted to follow up to say that I've tried this and it almost works but I haven't spent the time yet to really dig into why it is broken.

>

> The below does in fact make subsequent jobs for the same tool queue up rather than just charge forward but then it seems to be modifying the filename of the thing that is dependent on the dummy asset.

>

> I.e. I'm managing all of my own filenames so I'm doing:

>

> env.MyTool(output, input)

> env.SideEffect('#/dummy-lock.txt', output)

>

> But while MyTool runs correctly and successfully, I get an error that states SCons can't find the output file on a different path than the one it's been written to.


Just do it like this:
tool_output = env.MyTool(output, input)
env.SideEffect('#/dummy-lock.txt', tool_output)

i.e. use the actual node returned by MyTool to set the side effect dependency.


--
Gary


More information about the Scons-users mailing list