help-make
[Top][All Lists]
Advanced

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

Re: recursive make [Was: Help-make Digest, Vol 77, Issue 5]


From: Paul Smith
Subject: Re: recursive make [Was: Help-make Digest, Vol 77, Issue 5]
Date: Sat, 11 Apr 2009 22:00:53 -0400

On Sat, 2009-04-11 at 17:42 -0400, Michael R. Head wrote:
> The idea is to declare that a given subdirectory is dependent on just
> the files contained within it. Thus, the recursive make call should only
> be rebuilt when those dependencies are newer than the directory. I'm
> probably missing something glaringly obvious, though... 

I don't see how this can work reliably, at least not on any POSIX-like
system.

Timestamps on directories are updated when, and only when, the directory
is modified; that is, a new file is added, or a file is removed, or a
file is renamed.  Modifying an existing file doesn't change the
timestamp on the directory, for example.

That means that if a new file was added (depending on how your editor
works), or a "make clean" was done, or similar, then the directory
timestamp will be newer than any file in the directory... and yet the
build is completely out of date.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "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]