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

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

mike

-- 
Michael R. Head <[email protected]>
http://www.suppressingfire.org/~burner/
http://suppressingfire.livejournal.com


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to