[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vpath w/implicit pattern rule, & non-basename target (GNU make)
From: |
Philip Guenther |
Subject: |
Re: vpath w/implicit pattern rule, & non-basename target (GNU make) |
Date: |
Sat, 5 Jun 2010 13:05:37 -0700 |
On Fri, Jun 4, 2010 at 11:17 PM, <address@hidden> wrote:
> Trying to use vpath w/implicit pattern rule. Why does
> case B fail?
>
> # test makefile:
>
> /tmp/test0 $ cat makefile # simple test pattern rule
> %.foo: %.bar
> tac < $< > $@
>
> vpath %.bar /tmp/test0/src
>
> # dependency/source file:
>
> /tmp/test0 $ ls /tmp/test0/src
> x.bar
>
> # case A: success w/vpath:
...
> # case B: why does this fail?:
>
> /tmp/test0/tgt $ rm x.foo; cd ..
> /tmp/test0 $ make tgt/x.foo
> make: *** No rule to make target `tgt/x.foo'. Stop.
Given the directive
vpath %.bar /tmp/test0/src
the prerequisite of tgt/x.bar will match and be searched for in
"/tmp/test0/src/tgt/x.bar". That is, the directory path from the
prerequisite is kept.
Philip Guenther