[Top][All Lists]

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

Re: access to m4 macros when configuring in subdirectories

From: Ralf Wildenhues
Subject: Re: access to m4 macros when configuring in subdirectories
Date: Tue, 9 May 2006 08:46:05 +0200
User-agent: Mutt/1.5.11

Hi David,

* David Byron wrote on Mon, May 08, 2006 at 11:49:50PM CEST:
> Not sure if this is more automake or autoconf related.

Probably both.

> I'm fairly early in the process of creating one top level
> 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.

Wait.. you have a for each directory?  That is really rare.
Usual setup is to have one per software package, and a
bunch of  More than one is only necessary or
useful to
- bundle rather independent packages (also to remain rather independent)
- work around some limitations that stem from having one only (e.g.,
  essentially only one compiler, or compiler ABI flags setting, per

the together with their AC_CONFIG_SUBDIRS() links form an
acyclic directed graph (tree); each that stands on its own
(i.e., is not included by another, should be listed (with
name Makefile) in AC_CONFIG_FILES of exactly one, otherwise
havoc will ensue.

> 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, although the path is
> different...
> This happens to work, but I get warnings from autoreconf:
> util/libutils/src/ ACLOCAL_AMFLAGS multiply defined in
> condition TRUE ...
>   `util/libutils/src/' included from here
> ... `ACLOCAL_AMFLAGS' previously defined here
> If I remove the "second" assignment to ACLOCAL_AMFLAGS from the
>, the warning goes away, but configure fails in the
> subdirectory since macros it needs aren't available.

If you're going to merge the's, or include one into the
other, be sure to do the merge first.

Also note that ACLOCAL_AMFLAGS needs to be a literal (i.e., no $(macros)
or @substitutions@ in it) as it will be "parsed" by autoreconf; here,
parsing is meant in the form of a grep, or similarly dumb.

> 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.

Hmm.  Do you use the same aclocal.m4 file for several
scripts?  That would be new to me, too.  Common is to have them

> 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?

Maybe you can show more of your setup, so we can understand package
specific constraints.


reply via email to

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