[Scons-users] SCons not actually not using timestamp-newer decider correctly.

Bill Deegan bill at baddogconsulting.com
Mon May 7 14:23:52 EDT 2018


Seems like you have two questions/issues.
1) SCons creating sconsign file.
SCons will always create the sconsign file.
In this case it will store at least, all the dependencies, the command
lines for each target, the date and size of each file.

2) SCons is not checking the file timestamps between target and sources to
decide if the target should be rebuilt?
    Since in addition to file timestamp SCons will always check the Action
used to create the target files, and there is no information what those
were when there is no existing .sconsign, then it is expected that it would
rebuild.  Also factored into the decision whether to rebuild is the number
of dependencies for the target. If that number has changed (and in this
case since there is no previous information, that # would be 0 and would
always show changed), then it will rebuild.

Note: This is to ensure that (minimally) to target file is NOT rebuilt when
there is a change.  The inverse of this would be to assume that the command
line to create the target file didn't change, but since that's not a safe
assumption. SCons will not do that.

I can understand your confusion regarding the decider man page
documentation.

In essence the Decider influences rebuilds only when the previous build
information about action and dependencies of the target are unchanged.

Hope this helps.
-Bill



On Sun, May 6, 2018 at 5:41 PM, Lyuwen Fu <fulvwen at gmail.com> wrote:

> Hi,
>
> When I am trying to use timestamp-newer decider in scons. Scons is still
> trying to create a '.sconsign.dblite' file. And if the file does not exist.
> Scons will not compare the timestamp between the targets and dependencies
> to determine whether or not to rebuild. This is not the same as it is
> described "This is the behavior of the classic Make utility", because make
> does not generate any extra files.
>
> To recreate this issue, just execute:
> ```
> touch dep target
> echo “env = Environment()” > SConstruct
> echo “env.Decider("make”)” >> SConstruct
> echo “env.Command('target', 'dep', 'touch target’)” >> SConstruct
> scons -n
> ```
> The output will show the "'touch target” command even if 'target' has a
> timestamp newer than 'dep’.
>
>
> ================================
> Lyuwen Fu
> Ph.D. Candidate
> Columbia University
> fulvwen at gmail.com
> (347) 208-5539
>
> _______________________________________________
> 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/20180507/f0378aa7/attachment.html>


More information about the Scons-users mailing list