Hi, everyone,
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_countprj_count: @echo "[[$(outfile)]] <<$(wildcard
$(outfile))>> "
.PHONY: first_targetfirst_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, both produce the same result.
Thanks in advance.
Chen Jun (陈军)
[EMAIL PROTECTED]
2007-09-30
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make