Hi all :))

    Don't know if this is a bug, but anyway this doesn't work and it
should (IMHO). The problem is the function $(wildcard) not working
properly when the argument is a generated file. Let me explain it
with an example, better. We have this tiny Makefile:

all:
        @touch testfile

install: all
        @echo $(wildcard testfile)

clean:
        @rm testfile

    If we do 'make install', 'testfile' is created when the 'all'
target is run but $(wildcard) doesn't notice, so nothing is printed.
But if we do 'make all ; make install', the file is created and,
since $(wildcard) gets run in the second make, it noticed the newly
created file. Is this a bug or a feature? Will this undesired
behaviour (undesired by me, at least) be solved if I replace
$(wildcard pattern) with $(shell echo pattern)?

    This problem shows, AFAIK, with 3.79.1 and 3.80 versions of GNU
make. I've tested both, with the original Makefile and with the tiny
version I show above (the smallest Makefile that I can create that
shows the problem). I've attached that same Makefile.

    As always, thanks a lot for GNU make, a great job ;)))

    Raśl
all:
        @touch testfile

install: all
        @echo $(wildcard testfile)

clean:
        @rm testfile
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to