bug-automake
[Top][All Lists]
Advanced

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

Re: aclocal.m4 not regenerated when Makefile.am changes


From: Ralf Wildenhues
Subject: Re: aclocal.m4 not regenerated when Makefile.am changes
Date: Sun, 17 Feb 2008 18:48:07 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Colin,

* Colin Watson wrote on Sun, Feb 17, 2008 at 04:23:32PM CET:
> In a fresh unpacked copy of
> http://download.savannah.nongnu.org/releases/man-db/man-db-2.5.1.tar.gz:
> 
>   $ touch Makefile.am
>   $ ./configure
>   $ make
>   configure.ac:7: version mismatch.  This is Automake 1.10.1,
>   configure.ac:7: but the definition used by this AM_INIT_AUTOMAKE
>   configure.ac:7: comes from Automake 1.10.  You should recreate
>   configure.ac:7: aclocal.m4 with aclocal and run automake again.
>   WARNING: `automake-1.10' is probably too old.  You should only need it if
>            you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
>            You might want to install the `Automake' and `Perl' packages.
>            Grab them from any GNU archive site.
> 
> Of course, I have upgraded automake on my system to 1.10.1 since
> producing that tarball. But why didn't the rebuild rules just run
> aclocal for me? This seems as simple as adding Makefile.am to the
> dependencies of $(ACLOCAL_M4).

But normally, aclocal.m4 does not need to be regenerated when
Makefile.am is updated.  What you would really need in your case is a
dependency of aclocal.m4 on /usr/bin/aclocal-1.10.

Since we don't have dependencies on installed packages, pragmatically
the best thing to do when you update system tools is to run autoreconf.

> If nothing else, Makefile.am may contain ACLOCAL_AMFLAGS (and in fact
> does in this case), so IMO correct rebuild rules should re-run aclocal
> in case those flags changed;

Good point.  I don't know how to formulate this without making a blanket
dependency on Makefile.am, though; and that would, for the vast majority
of use cases, be much more work than is normally needed.  Users would
complain about this.

> although in order to get that completely
> right it also ought to fish ACLOCAL_AMFLAGS out of Makefile.am à la
> autoreconf ...

This does happen though, when the aclocal rule is executes: it has
        $(ACLOCAL) $(ACLOCAL_AMFLAGS)

Hope that helps.

Cheers,
Ralf




reply via email to

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