help-make
[Top][All Lists]
Advanced

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

Bug or feature


From: Gennady Kupava
Subject: Bug or feature
Date: Mon, 13 Apr 2015 15:40:47 +0100

Hi,

I have following makefile:

VPATH=./.
                                                                #VPATH=.

all: dir/lib.a

dir:
        +mkdir dir

dir/%.o: %.cpp dir
        +touch $@

dir/lib.a: dir/a.o dir/b.o
        +touch $@

clean:
        rm -rf dir

Problem is that if VPATH=./., I am getting following error:
rm -rf dir
address@hidden stdalonetest  5.8 $ gmake -f test.mk
mkdir dir
touch dir/a.o
gmake: *** No rule to make target `dir/b.o', needed by `dir/lib.a'.  Stop.
address@hidden stdalonetest  5.8 $ gmake -f test.mk
touch dir/b.o
touch dir/lib.a

if I set VPATH to . or unset it, all is fine. Is this a bug? How to explain
this?

Tested with gmake 3.82 and 4.1 on linux/amd64/RHEL5.

Thanks in advance,
Gennady


reply via email to

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