This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: distclean calls "naked" aclocal
Alexandre Oliva wrote:
> On Jun 15, 1999, Akim Demaille <demaille@inf.enst.fr> wrote:
>
> > On Tue, Jun 15, 1999 at 06:53:35PM +0900, Ionutz Borcoman wrote:
> >> Alexandre Oliva wrote:
>
> I used to distribute libtool.m4 with Amanda, in directory
> config/libtool, and run `aclocal -I config/libtool'. However, for
> people who had libtool.m4 in a directory that aclocal searched by
> default, it would complain about duplicate definition of the libtool
> macros and bail out :-(
I am using the approach Alexandre proposed for quite a while, but I am
using some more additions:
ACLOCAL = @ACLOCAL@ -I <dir>
ACLOCAL_FILES = \
<dir>/file1.m4 \
...
<dir>/filen.m4
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(ACLOCAL_FILES)
EXTRA_DIST = $(ACLOCAL_FILES)
The advantage of this approach is that there is no need to provide any
local "all-in-one" *.m4 file (such as libtool.m4, acinclude.m4), because
it always uses autoconf's standard aclocal.m4 instead. Adding the
dependency line above also ensures, that aclocal.m4 will be rebuild once
one of the <dir>/*.m4 has changed. The EXTRA_DIST ensures that the *.m4
will also be distributed.
Furthermore, IMO, it would be nice, if aclocal/autoconf/automake would
automatically add this dependency and appropriate DIST_FILES lines in
such case.
>
> That's why we really need AC_INCLUDE support in aclocal: macros
> defined in files distributed with a package and AC_INCLUDEd in
> configure.in (or acinclude.m4) should always override macros found by
> aclocal in standard search directories. And this would obviate the
> need for -I switches when running aclocal.
I can imagine how this could work, but AFAIS, there are two independent
problems involved simultaneously:
* overriding of macros with local macros (FWIW, this problem doesn't
exist if using a proper design of macros in <dir>/*.m4, such as prefixing
macros and files with a unique name)
* Automatic handling of ACLOCAL = @ACLOCAL@ -I <dir> or similar.
Ralf.
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de