This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Relative path in CPPFLAGS and distcheck
- From: Alexandre Duret-Lutz <adl at src dot lip6 dot fr>
- To: Robert Lowe <Robert dot H dot Lowe at lawrence dot edu>
- Cc: autoconf at gnu dot org, automake at gnu dot org
- Date: Sun, 05 Dec 2004 06:36:21 +0100
- Subject: Re: Relative path in CPPFLAGS and distcheck
- References: <41B26B62.8050205@lawrence.edu>
- Reply-to: automake at gnu dot org
[Please reply to automake@gnu.org]
>>> "Robert" == Robert Lowe <Robert.H.Lowe@lawrence.edu> writes:
Robert> Hi!
Robert> I have a set of common headers files in includes/ and the following
Robert> line in configure.ac:
Robert> AC_SUBST(CPPFLAGS,[-I../includes])
Should be
AC_SUBST([AM_CPPFLAGS], ['-I$(top_srcdir)/includes'])
or
AC_SUBST([AM_CPPFLAGS], ['-I$(top_srcdir)/includes -I$(top_builddir)/includes'])
if you have built headers.
See the thread "RFC for new FAQ entry: Flag Variables Ordering"
on the Automake lists to understand why redefining plain
CPPFLAGS is wrong.
Robert> ...since all source files are in parallel directories.
(The above doesn't require this.)
[...]
Robert> Also, is it perfectly legit to list these files in the top-level
Robert> Makefile.am as EXTRA_DIST, rather than explicitly listing this
Robert> subdirectory, adding a Makefile.am there, ... since there's
Robert> nothing to build there?
Yes. However you'd better use noinst_HEADERS instead of
EXTRA_DIST so that `make tags' and friends process the headers.
--
Alexandre Duret-Lutz