[Top][All Lists]

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

make VPATH $^

From: ts
Subject: make VPATH $^
Date: 18 Nov 2005 11:12:04 -0800
User-agent: G2/0.2

I apologize if I address a wrong group. I have problems to use VPATH
and $^ with gnu make. make finds prerequisites a with directory search
defined by VPATH but at link time it drops the directory prefix from
prerequisites and try to link objects as if they are in the working
directory e.g.:

VPATH = aaa:bbb
my: aaa.o bbb.o
        f90 -o $@ $^

#> make my

f90  -c dir1/aaa.f90
f90  -c dir2/bbb.f90
f90 -o my aaa.o bbb.o

According to the manual $^ is a list of all prerequisites with the full
path. I expected that $^ to be "dir1/aaa.o dir2/bbb.o" but it is
"aaa.o bbb.o".

What do I miss?  I'll appreciate any help. 
Thank in advance, Ted

reply via email to

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