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 Eggert
Subject: Re: POSIX ruling on up-to-date vs. identical timestamps
Date: Sat, 23 Aug 2014 18:33:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

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's a hack, but the heuristic doesn't require any system calls (and for what it's worth we don't get bug reports about it...).

This idea is implemented by Gnulib's 'utimecmp' module, which GNU Make is of course welcome to steal.



reply via email to

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