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-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make