[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Let autoreconf pass warning flags to new-enough aclocal.
From: |
Ralf Wildenhues |
Subject: |
[PATCH] Let autoreconf pass warning flags to new-enough aclocal. |
Date: |
Tue, 20 Jul 2010 06:47:29 +0200 |
User-agent: |
Mutt/1.5.20 (2010-04-22) |
* bin/autoreconf.in ($aclocal_supports_warnings)
($automake_supports_warnings): New globals.
(parse_args): Set and use them. Be sure to invoke `aclocal
--help' and `automake --help' just once each.
* NEWS: Update.
Prompted by report from Bruno Haible.
---
* Eric Blake wrote on Mon, Jul 19, 2010 at 11:13:24PM CEST:
> On 07/11/2010 12:51 AM, Ralf Wildenhues wrote:
> > PS: to add to ugliness, Bruno's use case could easily be worked around
> > by `autoreconf -Wno-syntax', except of course older aclocal didn't
> > accept -W* flags so autoreconf doesn't pass it to them. Yes, autoreconf
> > should check and then pass, another bug to fix ...
>
> How hard would it be to fix the bug in the next couple of hours? If
> it's easy, great; if not, it's not a regression, so it won't make it
> into 2.67.
Well, this patch passes -W* to aclocal if that supports it, but it
doesn't yet fix the reported issue completely, because aclocal doesn't
yet pass the warning flags to autom4te, which needs to be fixed in
Automake.
The patch should make autoreconf slightly faster though, too, due to the
saved fork.
Cheers,
Ralf
NEWS | 2 ++
bin/autoreconf.in | 16 +++++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index a8683c6..a1ce558 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ GNU Autoconf NEWS - User visible changes.
in other contexts, e.g., for Automake, and may be subject to
further restrictions in the future. Regression introduced in 2.66.
+** autoreconf passes warning flags to new enough versions of aclocal.
+
* Major changes in Autoconf 2.66 (2010-07-02) [stable]
Released by Eric Blake, based on git versions 2.65.*.
diff --git a/bin/autoreconf.in b/bin/autoreconf.in
index 0fc3bb8..e22f7b6 100644
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -122,8 +122,12 @@ my $install = 0;
my $symlink = 0;
# Does aclocal support --force?
my $aclocal_supports_force = 0;
+# Does aclocal support -Wfoo?
+my $aclocal_supports_warnings = 0;
# Does automake support --force-missing?
my $automake_supports_force_missing = 0;
+# Does automake support -Wfoo?
+my $automake_supports_warnings = 0;
my @prepend_include;
my @include;
@@ -182,8 +186,12 @@ sub parse_args ()
}
}
- $aclocal_supports_force = `$aclocal --help 2>/dev/null` =~ /--force/;
- $automake_supports_force_missing = `$automake --help 2>/dev/null` =~
/--force-missing/;
+ my $aclocal_help = `$aclocal --help 2>/dev/null`;
+ my $automake_help = `$automake --help 2>/dev/null`;
+ $aclocal_supports_force = $aclocal_help =~ /--force/;
+ $aclocal_supports_warnings = $aclocal_help =~ /--warnings/;
+ $automake_supports_force_missing = $automake_help =~ /--force-missing/;
+ $automake_supports_warnings = $automake_help =~ /--warnings/;
# Dispatch autoreconf's option to the tools.
# --include;
@@ -242,7 +250,9 @@ sub parse_args ()
$autoconf .= $warn;
$autoheader .= $warn;
$automake .= $warn
- if `$automake --help` =~ /--warnings/;
+ if $automake_supports_warnings;
+ $aclocal .= $warn
+ if $aclocal_supports_warnings;
}
}
--
1.7.2.rc3.47.g996ce
- Re: AC_CHECK_SIZEOF([int *]) is error in autoconf-2.66, (continued)
- Re: AC_CHECK_SIZEOF([int *]) is error in autoconf-2.66, Ralf Wildenhues, 2010/07/10
- Re: AC_CHECK_SIZEOF([int *]) is error in autoconf-2.66, Eric Blake, 2010/07/10
- AC_INIT regression [was: AC_CHECK_SIZEOF([int *]) is error in autoconf-2.66], Eric Blake, 2010/07/10
- Re: AC_INIT regression [was: AC_CHECK_SIZEOF([int *]) is error in autoconf-2.66], Paolo Bonzini, 2010/07/10
- Re: AC_INIT regression, Ralf Wildenhues, 2010/07/11
- Re: AC_INIT regression, Paolo Bonzini, 2010/07/11
- Re: AC_INIT regression, Paul Eggert, 2010/07/12
- Re: AC_INIT regression, Ralf Wildenhues, 2010/07/13
- Re: AC_INIT regression, Ralf Wildenhues, 2010/07/15
- autoreconf -W [was: AC_INIT regression], Eric Blake, 2010/07/19
- [PATCH] Let autoreconf pass warning flags to new-enough aclocal.,
Ralf Wildenhues <=
- [PATCH] Let autoreconf pass warning flags to new-enough aclocal., Ralf Wildenhues, 2010/07/20
- Re: [PATCH] Let autoreconf pass warning flags to new-enough aclocal., Eric Blake, 2010/07/20
- Re: AC_INIT regression, Eric Blake, 2010/07/19
- Re: AC_INIT regression, Eric Blake, 2010/07/19
- [PATCH] Fix up AC_INIT vs. " issues, and document it., Eric Blake, 2010/07/19
- Re: AC_INIT regression, Paolo Bonzini, 2010/07/20
- Re: AC_INIT regression, Eric Blake, 2010/07/20
- Re: AC_INIT regression, Eric Blake, 2010/07/20
- Re: AC_INIT regression, Eric Blake, 2010/07/20
- [PATCH] Also reject ' from AC_INIT strings., Eric Blake, 2010/07/20