[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: variable value lost with "include" directive
From: |
Philip Guenther |
Subject: |
Re: variable value lost with "include" directive |
Date: |
Fri, 6 Oct 2006 03:06:41 -0600 |
On 10/6/06, Aditya Kher <address@hidden> wrote:
I am having something like below:
$pwd/Makefile:
VPATH:= ./foo:./boo
include ../../bin/Makefile
and in ../../bin/Makefile:
VPATH+=../include
target1:include_file1 file_from_directory_foo file_from_directory_boo
<TAB>gcc $^
When I attempt running in $pwd
%gmake target_1
It complains about include_file not found.
I suspect this is beacuse the value of VPATH is not carried through
when I include another Makefile
No, they're carried through. You can verify this by adding this line
to ../../bin/Makefile right after the VPATH appending:
$(warning VPATH=${VPATH})
Am I missing something?
Is the '../include' directory relative to the directory in which you
invoked gmake? If not, that's your problem. 'include' does not
change the base directory from which make interprets relative paths.
Philip Guenther