help-make
[Top][All Lists]
Advanced

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

Re: Resolution of timestamp, other possible pitfalls?


From: Paul Smith
Subject: Re: Resolution of timestamp, other possible pitfalls?
Date: Tue, 31 Jul 2007 09:19:57 -0400

On Tue, 2007-07-31 at 09:55 +0200, Torsten Mohr wrote:

> as i understand it the resolution of the timestamps of files is 1 second.
> Is this sufficient for "make" to work correctly?  Especially as nowadays
> PCs get more and more powerful?  Is it possible that problems can occur
> from that?

Make uses the resolution of the underlying filesystem.  Many modern
filesystems support sub-second timestamp resolutions and, where they do,
make will use them.

Other filesystems, such as some DOS/Windows filesystems, use
super-second timestamps.  Also, some file formats (such as ar (static
library) files) use second timestamps internally regardless of the
underlying filesystem.

It's true that make can make incorrect rebuild decisions of your system
is too fast for your filesystem's timestamp resolution.

There is a GSoC project underway right now which will add a feature of
"user definable out of date detection"; this should allow users to use
md5sum or other advanced criteria for determining when files are out of
date.

> Another question, i heard that on some windows systems a file that is
> saved on a network drive gets the timestamp of the server it is stored on,
> not the one of the client that stored the file.  Is this still correct?

I don't know much/anything about Windows, as I never use it, but most
networked filesystems I'm aware of have the server compute the last
modified timestamp of the file, yes.

> For "make" this looks to be a big problem.  Are any other issues like this
> known where "make" could possibly fail though the user did everything correct?

It's only a problem if the server and the client have very different
system clocks.  That's why, if you're building over the network, it's
absolutely critical that ALL your systems (clients and serves) use NTP
or some other very reliable method for syncing clocks.

It's a good idea anyway, but it's mandatory for make-based build
environments.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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