help-make
[Top][All Lists]
Advanced

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

problem with pattern rules and VPATH


From: wim delvaux
Subject: problem with pattern rules and VPATH
Date: Mon, 21 Apr 2003 04:21:16 +0200
User-agent: KMail/1.5.1

HI all,

I have a rule like this

a/b/a.o a/b/b.o a/b/c.o : a/b/%.o : %.c 
         ...

The purpose of this rule is to output the objects into a different directory 
than the sources (objects in ./a/b and sources in . )
Now in SOME situations the course COULD be in an VPATH directory (say x/y)

So I set

VPATH=.:x/y

Now I notice that the .c file is STILL searced for in . whereas the object 
file does not exist.

Running make in -d mode shows that indeed the a.c b.c and c.c files are 
searched in . and not in ANY VPATH dir

I have a workaround by defining rewriting as

a/b/a.o a/b/b.o a/b/c.o : a/b/%.o : $(SPECIALLOC)%.c 
         ...

where the SPECIALLOC variable is set to x/y in those cases where the rule does 
not work.

How can I get rid of this workaround and make the pattern rule search VPATH in 
the above circumstances.

Thanx
W




reply via email to

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