[Scons-users] Recursive directories, and the ignoring of filenames.

Alistair Buxton a.j.buxton at gmail.com
Thu Aug 2 21:19:22 EDT 2018


On 3 August 2018 at 01:49, Jack Brennen <jbrennen at qti.qualcomm.com> wrote:
> For your first example, which you say will work exactly once, and never
> again...
>
> Can you just make that node dependent on a Value node with the tuple of the
> current time and PID as the Value?
>
> import os, time
> env.Depends('listing.txt', env.Value((time.time(),os.getpid())))
>
>
> By making it dependent on the tuple of time.time() with os.getpid(), it
> should effectively rerun the "ls" command every time you execute SCons.  The
> chance of getting the same time and the same PID in different SCons
> executions should be vanishingly small.

I could just use AlwaysBuild for that. The problem is to make the
build action run if and only if the dependencies have changed in some
way.


-- 
Alistair Buxton
a.j.buxton at gmail.com


More information about the Scons-users mailing list