automake
[Top][All Lists]
Advanced

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

access to m4 macros when configuring in subdirectories


From: David Byron
Subject: access to m4 macros when configuring in subdirectories
Date: Mon, 8 May 2006 14:49:50 -0700

Not sure if this is more automake or autoconf related.

I'm fairly early in the process of creating one top level
Makefile.am/configure.ac to get non-recursive Makefiles.  I've got a few
directories already building with autoconf/automake.  I'm using
AC_CONFIG_SUBDIRS at the moment so configure still runs for each
subdirectory.

They all use m4 macros that they get access to with:

ACLOCAL_AMFLAGS = -I <macro directory path>

I added the same to my top level Makefile.am, although the path is
different...

This happens to work, but I get warnings from autoreconf:

util/libutils/src/Makefile.am:6: ACLOCAL_AMFLAGS multiply defined in
condition TRUE ...
Makefile.am:14:   `util/libutils/src/Makefile.am' included from here
Makefile.am:7: ... `ACLOCAL_AMFLAGS' previously defined here

If I remove the "second" assignment to ACLOCAL_AMFLAGS from the
sub-Makefile.am, the warning goes away, but configure fails in the
subdirectory since macros it needs aren't available.

I guess aclocal only copies macros that it needs to, but I use many more
macros in the subdirectories that aren't getting into aclocal.m4.

Do I need to switch things to only run configure once at the top?  My
reflex is to avoid that at least for now.  Anyone have any suggestions
for getting this to work without warnings?

-bash-2.05b$ automake --version
automake (GNU automake) 1.9.6

-bash-2.05b$ aclocal --version
aclocal (GNU automake) 1.9.6

-bash-2.05b$ autoconf --version
autoconf (GNU Autoconf) 2.59

Thanks much.

-DB




reply via email to

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