[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MAC
From: |
Eric Blake |
Subject: |
Re: [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS |
Date: |
Fri, 09 Nov 2012 13:31:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 |
On 11/03/2012 06:36 AM, Stefano Lattarini wrote:
> A new macro 'AC_CONFIG_MACRO_DIRS' has been recently introduced in
> autoconf (and is expected to appear in the autoconf 2.70 release),
> allowing us to declare several local m4 macro directories for a
> package.
>
> @@ -731,7 +731,8 @@ sub trace_used_macros ()
> 'AC_DEFUN_ONCE',
> 'AU_DEFUN',
> '_AM_AUTOCONF_VERSION',
> - 'AC_CONFIG_MACRO_DIR')),
> + 'AC_CONFIG_MACRO_DIR',
> + 'AC_CONFIG_MACRO_DIRS')),
Here, you should just trace AC_CONFIG_MACRO_DIR_TRACE, once I finish
posting my autoconf patches.
> @@ -763,7 +764,11 @@ sub trace_used_macros ()
> }
> elsif ($macro eq 'AC_CONFIG_MACRO_DIR')
> {
> - $ac_config_macro_dir = $arg1;
> + @ac_config_macro_dirs = ($arg1);
> + }
> + elsif ($macro eq 'AC_CONFIG_MACRO_DIRS')
> + {
> + push @ac_config_macro_dirs, split (/\s+/, $arg1);
You still have to trace AC_CONFIG_MACRO_DIR for the sake of older
autoconf; but if AC_CONFIG_MACRO_DIR_TRACE exists, you will end up
seeing the first directory under both macros. So this logic will need
to check if the new macro exists, and if so, ignore the old macro (or
else continue to trace both, but do duplicate elision at the end; and
duplicate elision might make sense anyways). Also, since
AC_CONFIG_MACRO_DIR_TRACE is called once per directory (no matter how
many directories were crammed in one AC_CONFIG_MACRO_DIRS call), you
don't need to do any of the split(/\s+/) magic.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [PATCH 0/6] Support for AC_CONFIG_MACRO_DIRS in aclocal, Stefano Lattarini, 2012/11/03
- [PATCH 2/6] aclocal: diagnose non-existing directories in AC_CONFIG_MACRO_DIRS better, Stefano Lattarini, 2012/11/03
- [PATCH 3/6] tests: better coverage for AC_CONFIG_MACRO_DIRS, Stefano Lattarini, 2012/11/03
- [PATCH 4/6] aclocal: smash newlines in arguments of traced macros, Stefano Lattarini, 2012/11/03
- [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS, Stefano Lattarini, 2012/11/03
- Re: [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS,
Eric Blake <=
- [PATCH 5/6] coverage: expose a bug in aclocal (spurious warnings), Stefano Lattarini, 2012/11/03
- [PATCH 6/6] aclocal: avoid spurious warnings from autom4te with AC_CONFIG_MACRO_DIRS, Stefano Lattarini, 2012/11/03
[PATCHv2 0/8] Support for AC_CONFIG_MACRO_DIRS in Automake, Stefano Lattarini, 2012/11/10