[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to use wildcard in prerequisite

From: hans . peter . van . lohuizen
Subject: how to use wildcard in prerequisite
Date: Mon, 1 Sep 2003 15:26:09 +0200


I want to define a dependency for several files in the cmd directory like this:

%project/out : %cmd/*.tcl
This failed, the * did not expand as far as I could see.

Now I tried:
%project/out : %$(wildcard cmd/*.tcl)

Now I was surpised to see only the first .tcl file get the % expanded. All the other files did not !(just cmd/<file>.tcl)
So this did not work either.

Now I tried a work around like:
CMD = $(shell ls cmd/*.tcl | sed 's/cmd/%cmd/')
%project/out: $CMD

Now it works as I would expect.
(This actually reproduces a hand made list of %cmd/<files>.tcl which worked also.)

Now I wonder, is there really not a better way to do this other than "hacking" by shell commands?
Could this be a bug?


Hans Peter.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]