On Wed, Apr 7, 2010 at 9:47 AM, Payal <[email protected]> wrote:

> 2 questions on this,
> 1. Why does this not work?
> all : $(wildcard *.cdb)
>

That can only work if the .cdb files already exist. Wildcard does not
generate strings for non-existent files. To do that you could use:

all: $(patsubst %,%.cdb, a b)

or, assuming all of your input files already exist:

all: $(patsubst %.tcp, %.cdb, $(wildcard *.tcp))


2. How can I avoid listing explicitly?
> a.cdb :
> b.cdb :
>

You can also pass them on the command line:

   make a.cdb

but of course that's annoying.

Your makefile must SOMEHOW get the list. Whether you specify it on the
command line or via $(patsubst) or something else is up to you.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to