[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] autoupdate vs aclocal m4_include
From: |
Noah Misch |
Subject: |
Re: [BUG] autoupdate vs aclocal m4_include |
Date: |
Mon, 3 Apr 2006 12:23:11 -0700 |
User-agent: |
Mutt/1.5.6i |
Hi Gary,
On Fri, Nov 19, 2004 at 06:33:59AM +0000, Gary V. Vaughan wrote:
> This is Autoconf-2.59, Automake-1.9.2, CVS Libtool branch-2-0:
>
> Unless AC_CONFIG_MACRODIR is called aclocal or m4sugar, autoupdate
> complains about `unknown set' if aclocal.m4 uses m4_include. The
> run still works, but there are several pages of spurious warnings.
> Here's a minimal repeat recipe:
Thanks for the report. Here's a somewhat more minimal repeat recipe:
$ cat configure.ac
AC_INIT(x,0)
AC_UNCHANGED_MACRO
AC_OLD_MACRO
AC_OUTPUT
$ cat m4/stuff.m4
AU_ALIAS([AC_OLD_MACRO], [AC_NEW_MACRO])
AC_DEFUN([AC_NEW_MACRO], [echo hi])
AC_DEFUN([AC_UNCHANGED_MACRO], [echo one])
$ ln -s m4 aclocal
$ aclocal -I aclocal
$ autoupdate
$ aclocal -I m4
$ autoupdate
autoupdate: unknown set: m4: AU:m4/stuff.m4:AC_OLD_MACRO
autoupdate: unknown set: m4: AU:m4/stuff.m4:_au_warn_AC_OLD_MACRO
autoupdate: unknown set: m4: AC:m4/stuff.m4:m4_location(AC_OLD_MACRO)
autoupdate: unknown set: m4: AC:m4/stuff.m4:AC_OLD_MACRO
autoupdate: unknown set: m4: AC:m4/stuff.m4:m4_location(AC_NEW_MACRO)
autoupdate: unknown set: m4: AC:m4/stuff.m4:AC_NEW_MACRO
autoupdate: unknown set: m4: AC:m4/stuff.m4:m4_location(AC_UNCHANGED_MACRO)
autoupdate: unknown set: m4: AC:m4/stuff.m4:AC_UNCHANGED_MACRO
`autoupdate' sanity checks the dirname of every file in which it locates a macro
definition. Now that `aclocal' can m4_include macro files instead of copying
them into `aclocal.m4', the set of reasonable dirnames is not so constrained. I
could not figure a need for a sanity check, so I just removed it. It would be
good if someone more familiar with autoupdate could review this patch, however.
Note that naming a macro directory `m4sugar' causes autoupdate to misbehave,
because it treats macros therein like m4sugar macros.
Ok?
2005-04-03 Noah Misch <address@hidden>
* bin/autoupdate.in (handle_autoconf_patches): Do not error on finding a
macro defined in an unexpected directory.
diff -urp -X dontdiff ac-clean/bin/autoupdate.in ac-au_dirname/bin/autoupdate.in
--- ac-clean/bin/autoupdate.in 2006-04-01 10:58:43.000000000 -0500
+++ ac-au_dirname/bin/autoupdate.in 2006-04-03 13:59:53.000000000 -0400
@@ -145,28 +145,19 @@ sub handle_autoconf_macros ()
{
chomp;
my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next;
- # ../lib/m4sugar/m4sugar.m4 -> m4sugar
- # ../lib/m4sugar/version.m4 -> m4sugar
- # ../lib/autoconf/general.m4 -> autoconf
- # aclocal.m4 -> aclocal
- # ../lib/m4sugar/m4sh.m4 -> m4sh
my $set = basename (dirname ($file));
- $set = 'aclocal' if $file eq 'aclocal.m4';
- $set = 'm4sh' if basename($file) eq 'm4sh.m4';
- error "unknown set: $set: $_"
- unless $set =~ /^(m4sugar|m4sh|aclocal|autoconf)$/;
if ($domain eq "AU")
{
$au_macros{$macro} = 1;
}
- elsif ($set eq "m4sugar")
+ elsif ($set eq "m4sugar" && basename ($file) ne 'm4sh.m4')
{
# Add the m4sugar macros to m4_builtins.
$m4_builtins{$macro} = 1;
}
else
{
- # Autoconf, aclocal, and m4sh macros.
+ # All other macros.
$ac_macros{$macro} = 1;
}
}
- Re: [BUG] autoupdate vs aclocal m4_include,
Noah Misch <=