Nick Patavalis wrote:
On Sun, Feb 05, 2006 at 11:14:47PM +0100, August Karlstrom wrote:
.PHONY: main
main: $(wildcard *.suffix2)
I guess it is obvious why it doesn't work. The wildcard function
expands to a list of all the files ending in ".suffix2" present in the
current directory.
Yes, of course. I found out just after pressing the send button. <:(
What you described in your text, though, is correct: You need to make
a ".suffix2" file for every corresponding ".suffix1" file present in
the current directory. A possible solution is this:
.PHONY: main
main: $(patsubst %.suffix1,%.suffix2,$(wildcard *.suffix1))
Or, written in a more readable, though essentially identical, manner:
s1list := $(wildcard *.suffix1)
s2list := $(s1list:.suffix1=.suffix2)
.PHONY: main
main: $(s2list)
OK, thanks a lot for your help, Nick.
August
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make