[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:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 |
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
.PRECIOUS:
.INVALIDATE_CACHE_WHEN_SHELLING: targ1 targ2
.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
<http://savannah.gnu.org/bugs/download.php?file_id=10317>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14617>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #14617] wildcard function produces incorrect results because of cache,
Larry West <=