[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$(wildcard) not expanding generated files
From: |
DervishD |
Subject: |
$(wildcard) not expanding generated files |
Date: |
Mon, 20 Jan 2003 20:02:59 +0100 |
User-agent: |
Mutt/1.4i |
User-agent: |
Mutt/1.4i <http://www.mutt.org> |
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
Makefile
Description: Makefile
- $(wildcard) not expanding generated files,
DervishD <=