bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX ruling on up-to-date vs. identical timestamps


From: Paul Smith
Subject: Re: POSIX ruling on up-to-date vs. identical timestamps
Date: Tue, 26 Aug 2014 10:52:32 -0400

On Sat, 2014-08-23 at 18:33 -0700, Paul Eggert wrote:
> Paul Smith wrote:
> 
> > It needs to be considered carefully.
> 
> How about having GNU 'make' do what GNU 'cp -u' does?
> 
> The idea is to infer filesystem timestamp resolution by looking at every 
> file timestamp that crosses your desk.  When you see a file timestamp 
> whose tv_nsec is nonzero modulo 1000000, for example, you know that its 
> filesystem's resolution is finer-grained than 1 millisecond.  When 
> computation starts, you are conservative and assume that filesystems 
> have 1-second resolution, but as computation goes on you gain more 
> information about each filesystem and can become less and less conservative.

It concerns me that this could cause the build to be non-deterministic
in certain pathological situations, but it could be managed I'm sure.

The immediate issue is that today, make doesn't track "filesystems".  It
has no idea which files live on which filesystems, so we can't really
keep track of the resolution on a per-filesystem basis.

Of course the ability to track filesystems could be added without too
much effort.  It's trivial to determine the filesystem in POSIX via the
device ID available from stat(), of course, but I'm not sure what
facilities are available on the other ports.  Although, I don't think
either Windows or VMS support high-resolution timestamps right now (I
don't know why Windows doesn't, because NTFS does support millisecond
resolution timestamps I believe) so perhaps this is irrelevant.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]