[Top][All Lists]

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

[bug #14617] wildcard function produces incorrect results because of cac

From: Larry West
Subject: [bug #14617] wildcard function produces incorrect results because of cache
Date: Fri, 7 Jul 2006 02:34:32 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060508 Firefox/

Follow-up Comment #1, bug #14617 (project make):

I'm seeing the same problem, I believe, on RHEL 4 with Make 3.80.  In my
case, I'm testing for a (target-like) directory with $(wildcard $(DIR)), then
creating the directory.  In my real Makefile, a later sanity test with $(if
$(wildcard $(DIR)) then aborts, even though the directory does indeed exist.

I see the need for cacheing to minimize the time spent calling stat(2), as
mentioned in bug #443, but I think there should be some mechanism to
invalidate the cache.

The easiest would be to invalidate the cache when a shell command is invoked.
 Possibly make this an attribute for some target trees via a phony target like


.INVALIDATE_CACHE_WHEN_SHELLING:  # no dependencies = "always"

Of course a less stupid name would be preferable.

Or an explicit function: $(invalidate_cache), possibly accepting a list of
filenames: $(invalidate_cache file1 file2) if it's not too much work.

Anyway, I'm uploading an example Makefile that demonstrates the problem, and
the output from "make -d -p".

Additional Item Attachment:

File name: wildcard-cache.tgz             Size:5 KB
tgz w/ Makefile & output  illustrating $(wildcard) cacheing problem


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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