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

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

Reply via email to