[Top][All Lists]

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

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

From: Michael R. Head
Subject: Re: recursive make [Was: Help-make Digest, Vol 77, Issue 5]
Date: Sat, 11 Apr 2009 22:09:15 -0400

On Sat, 2009-04-11 at 22:00 -0400, Paul Smith wrote:
> 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.

"touch" also works on directories to update the mtime (at least on
ext3), but as you say below, this isn't the most severe issue with my

> 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.

Ahh... right. That's what was missing from my thinking. 

Thanks for the clue!


Michael R. Head <address@hidden>

reply via email to

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