help-make
[Top][All Lists]
Advanced

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

Stale directory cache (patch included)


From: Berend Ozceri
Subject: Stale directory cache (patch included)
Date: Thu, 23 Sep 2004 11:40:10 -0700

Attached is a patch that contains one possible workaround for the
much-discussed directory cache staleness problem that creeps up from
time to time. Whether the staleness is merely a sign of incompletely
written Makefiles or not remains a topic of discussion, but the
directory cache behavior is definitely incorrect. One clear example
where even a properly written Makefile can misbehave is when vpath
directives are used to specify search paths when the very directories
that are being searched are created as a part of the build.

My patch modifies the cache code in dir.c to reopen the directory (i.e.
opendir()) when a search for a file in a directory is about to return a
negative result, but the modification time of the directory inode has
changed, indicating possible file additions and deletions. I do realize
that in some situations this my actually significantly reduce the value
of the directory cache, but make performs more correctly, in my humble
opinion, with the patch. I should add that I'm using make for a more
unorthodox use (building hardware design trees rather than software).

Berend

Attachment: make-stale-cache.patch
Description: Text document


reply via email to

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