[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vpath w/implicit pattern rule, & non-basename target (GNU make)
From: |
gnu_make0 |
Subject: |
vpath w/implicit pattern rule, & non-basename target (GNU make) |
Date: |
Sat, 05 Jun 2010 01:17:11 -0500 |
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:
/tmp/test0 $ cd tgt/
/tmp/test0/tgt $ make -f ../makefile x.foo
tac < /tmp/test0/src/x.bar > x.foo
# 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.
--
thanks much
T
--
PS
w/a minor chg to makefile,
make tgt/x.foo
works and the simplier target fails:
/tmp/test0 $ cat makefile
tgt/%.foo: %.bar
tac < $< > $@
vpath %.bar /tmp/test0/src
/tmp/test0 $ cd tgt/
/tmp/test0/tgt $ ls
/tmp/test0/tgt $ make -f ../makefile x.foo
make: *** No rule to make target `x.foo'. Stop.
/tmp/test0/tgt $ cd ..
/tmp/test0 $ make tgt/x.foo
tac < /tmp/test0/src/x.bar > tgt/x.foo
- vpath w/implicit pattern rule, & non-basename target (GNU make),
gnu_make0 <=