automake
[Top][All Lists]
Advanced

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

Re: Can automake move aclocal.m4 into subdirectory?


From: Stefano Lattarini
Subject: Re: Can automake move aclocal.m4 into subdirectory?
Date: Tue, 23 Apr 2013 10:32:48 +0200

On 04/23/2013 06:50 AM, Thien-Thi Nguyen wrote:
> () Bob Rossi <address@hidden>
> () Mon, 22 Apr 2013 20:52:27 -0400
> 
>    On Fri, Apr 12, 2013 at 10:06:02PM -0400, Bob Rossi wrote:
>    > Is it possible to tell automake to move the generated file
>    > aclocal.m4 into a build subdirectory?
> 
> In (info "(autoconf) autoreconf Invocation")
> there is:
> 
>     If you want `autoreconf' to pass flags that are not listed here on
>  to `aclocal', set `ACLOCAL_AMFLAGS' in your `Makefile.am'.  Due to a
>  limitation in the Autoconf implementation these flags currently must be
>  set on a single line in `Makefile.am', without any backslash-newlines.
> 
> so if you use autoreconf (which is Recommended) in the bootstrap flow,
> you can try adding
> 
>  ACLOCAL_AMFLAGS = --output build/m4/aclocal.m4
>
But consider that ACLOCAL_AMFLAGS is basically an hack, and deprecated since
Automake 1.13 (albeit it will be supported for at least some years to come,
due to its widespread use "in the wild").

My suggestion is: just live with aclocal.m4 in the top-level.  Basically
every Automake client does so, and I'm not sure Automake is really up to
supporting an alternate location for it.  Trying to force such a location
might cause subtle bugs and unexpected behaviors.  Of course, you might
succeed in your intention if you use enough care, but IMHO the result would
not be worth the effort and/or risk.

> to the top-level Makefile.am.  I suppose:
> 
>  AC_CONFIG_MACRO_DIR(build/m4)
> 
> will then be sufficient for the tools to DTRT.
>
No, that is only used by aclocal to decide where to look for extra local
m4 files to be used when generating aclocal.m4, and by tools like
"libtoolize", "autopoint" and "aclocal --install" to decide where to
locally install their provided m4 files.

> I haven't tried this
> approach yet, having just learned about it, prompted by your query (so
> thanks for asking!), however.  Does it work?
>
No.

Regards,
  Stefano



reply via email to

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