Question

I was looking at Scons source code but cant seem to pinpoint where it is calculating for timestamp (didnt have trouble finding MD5 calculation).

And the manual page just refers as timestamp and does not go in depth of what it actual is. Maybe it is obvious for some but I am still unclear what this exactly means.

Timestamp of what?

Is the following the way Scons use for timestamp consistency?

time.ctime(os.path.getmtime(file))

basically checking for when a file is modified?

And then compare this against what at run time?

Was it helpful?

Solution

If you have ever worked with Make, the concept should be familar. Basically it compares the modification time of the source with the target, and if the source is newer, it should rebuild the target. There is also some file signature information that SCons stores internally in the .sconsign.dblite file, that I dont believe can be accessed programatically.

As can be seen in the SCons Decider() function docs, the behaviour can be configured to be one of the following (copied from the SCons man page):

  • timestamp-newer (This is the behavior of the classic Make utility, and make can be used a synonym for timestamp-newer)
  • timestamp-match
  • MD5
  • MD5-timestamp
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top