URL:
<http://savannah.gnu.org/bugs/?21231>
Summary: $(wildcard ) function sometimes fails very
strangely
Project: make
Submitted by: chjfth
Submitted on: Wednesday 10/03/2007 at 09:51
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: Any
Fixed Release: None
_______________________________________________________
Details:
I encountered a strange situation recently, $(wildard ) function seems
failing to work. See my code below:
========================================================
all: first_target
outfile = out.txt
$(outfile):
@echo nnn > $@
.PHONY: prj_count
prj_count:
@echo "[[$(outfile)]] <<$(wildcard $(outfile))>> "
.PHONY: first_target
first_target: $(outfile) prj_count
@echo "[DONE]"
========================================================
First, delete out.txt and run make on that makefile, the output is
[[out.txt]] <<>>
[DONE]
then, run make again, the output is
[[out.txt]] <<out.txt>>
[DONE]
Result of the first run is strange. When target prj_count is being made,
out.txt should have been generated on my disk(because $(outfile) had been made
before), then WHY $(wildcard out.txt) gives me null result ?
I've tested it on make 3.80 & 3.81 on Linux and on Windows(MSVC-built), both
produce the same result.
Reference mailling list item:
http://lists.gnu.org/archive/html/help-make/2007-09/msg00060.html
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21231>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make