This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: vpath builds and include paths
- From: Bob Friesenhahn <bfriesen at simple dot dallas dot tx dot us>
- To: jling at bioinformatics dot ubc dot ca
- Cc: automake at gnu dot org
- Date: Mon, 22 Dec 2003 09:04:35 -0600 (CST)
- Subject: Re: vpath builds and include paths
On Mon, 22 Dec 2003 jling@cmmt.ubc.ca wrote:
> However, if I want to build in a separate build tree (relying on
> VPATH), then I try the following:
>
> mkdir /build
> cd /build
> /test/configure
> make
>
> This attempts to build in this new /build directory, but during
> compilation it cannot locate the header file, myproj.hpp, and the rest
> of the build fails. What do I need to do in order to tell automake
> where this header is? I've already tried using the absolute path
> variables in the Makefile.am:
>
> INCLUDE = -I$(abs_top_srcdir)/project2/sublevel/inc
Note that abs_top_srcdir calculation was broken in Autoconf 2.58. It
is fixed in 2.59.
Rather than using INCLUDE you should use AM_CPPFLAGS. For example
AM_CPPFLAGS = -I$(top_srcdir)/project2/sublevel/inc
Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen