[Please reply to automake@xxxxxxx]
"Robert" == Robert Lowe <Robert.H.Lowe@xxxxxxxxxxxx> 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.
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:
http://www.lawrence.edu/fast/lower/hello-0.5.tar.gz (it has to replicate there, but should be there by 20:30 GMT)
From that, configure.ac is:
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script.
AC_INIT(hello,0.5) AM_INIT_AUTOMAKE(hello,0.5) AC_CANONICAL_HOST
# Checks for programs. AC_PROG_CC AC_PROG_INSTALL
AC_CREATE_STDINT_H([${srcdir}/includes/_stdint.h])
AC_SUBST(AM_CPPFLAGS,['-I$(top_srcdir)/includes -I$(top_builddir)/includes'])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT
...and, Makefile.am:
SUBDIRS = src EXTRA_DIST = reconf noinst_HEADERS = includes/stdio.h
...and, src/Makefile.am:
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?
*FAILS*:
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 ...
*SUCCEEDS*:
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> 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.
Again, thank you for the correction!
-Robert
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf