[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VPATH as a target-specific variable
From: |
John Graham-Cumming |
Subject: |
Re: VPATH as a target-specific variable |
Date: |
Tue, 25 Jan 2005 15:42:29 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104 |
Darren Hiebert wrote:
Has anyone else noticed that the VPATH variable does not appear to work
when set
using a target-specific variable assignment?
Example:
some_target: VPATH = path
That's correct. VPATH is global.
I have a real need for this capability.
Perhaps you should take a look at the vpath directive.
For example, suppose that I want a specific VPATH search path for a
specific target I can do the following:
.PHONY: all
all: foo.bar ; @echo $@ $<
vpath foo.bar src/
foo.bar: ; @echo Making $@
If there's a foo.bar in the src/ directory then the vpath directive will
cause it to be used and you'll see the following output:
all src/foo.bar
John.
--
John Graham-Cumming
jgc@jgc.org
Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/