[Top][All Lists]

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

Re: Relative path in CPPFLAGS and distcheck

From: Robert Lowe
Subject: Re: Relative path in CPPFLAGS and distcheck
Date: Sun, 05 Dec 2004 15:26:30 -0600
User-agent: Mozilla Thunderbird 0.8 (X11/20041020)

Alexandre Duret-Lutz wrote:
[Please reply to address@hidden

"Robert" == Robert Lowe <address@hidden> writes:

 Robert> Hi!
 Robert> I have a set of common headers files in includes/ and the following
 Robert> line in

 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.

Thank you for the pointers!

Robert> ...since all source files are in parallel directories.
(The above doesn't require this.)

Well, make distcheck is still failing, but not on every box I've
tried it.  I thought I would distill everything down to a simple
'hello, world' example (with a built header and a copy of stdio.h)
which you can find at:
  (it has to replicate there, but should be there by 20:30 GMT)

From that, is:

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.


# Checks for programs.


AC_SUBST(AM_CPPFLAGS,['-I$(top_srcdir)/includes -I$(top_builddir)/includes'])

AC_CONFIG_FILES([Makefile src/Makefile])


EXTRA_DIST = reconf
noinst_HEADERS = includes/stdio.h

...and, src/

bin_PROGRAMS = hello
hello_SOURCES = hello.c
hello_CFLAGS = -Wall -pedantic

A make distcheck with this example fails on my home system with FC3
running on an AMD Athlon, but *succeeds* on an Intel box running an
older Linux kernel, and older versions of autoconf/automake.  I know
that's a lot of variables.  Perhaps I've still not learned something
I should have, or am I running into some other problem?


Linux 2.6.9-1.667 #1 Tue Nov 2 14:50:10 EST 2004 x86_64 x86_64 x86_64 GNU/Linux

$ autoconf --version
autoconf (GNU Autoconf) 2.59

$ automake --version
automake (GNU automake) 1.9.3


Linux 2.4.21-9.ELsmp #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux

# autoconf --version
autoconf (GNU Autoconf) 2.57

# automake --version
automake (GNU automake) 1.6.3


 Robert> Also, is it perfectly legit to list these files in the top-level
 Robert> as EXTRA_DIST, rather than explicitly listing this
 Robert> subdirectory, adding a 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.

Again, thank you for the correction!


reply via email to

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