On Mon, Aug 9, 2010 at 9:19 AM, Paul Smith <[email protected]> wrote: > I think the plan was to use touch's -r option (or -t maybe) to set the > timestamp to a specific time (that is, to the exact same time as the > prereq file), rather than just setting the timestamp to "now". > > That should be pretty safe across all kinds of filesystems...
As I understand it even this runs into a Unix problem, which may have been part of what Todd was alluding to. The POSIX API has a fundamental flaw; though systems are allowed to track file times to any granularity - Solaris, for instance, stores nanosecond file times (though there may be some roundoff involved) - the system call to "touch" a file to a particular time is utimes() which can only do microseconds. Thus if you create file X and then "touch -r X Y" the timestamps may not be equal; Y will be X rounded off to microseconds. GNU make has a .LOW_RESOLUTION_TIME target which may help, but you're already deep into the weeds here. David Boyce _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
