[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] {maint} aclocal: error out again on unrecognized arguments
From: |
Stefano Lattarini |
Subject: |
[PATCH] {maint} aclocal: error out again on unrecognized arguments |
Date: |
Wed, 2 May 2012 00:14:27 +0200 |
Starting from commit v1.11-662-g52246cc of XXX, "XXX", aclocal has
been silently ignoring non-option arguments instead of correctly
reporting them. Fix this regression.
* t/aclocal.sh: Update to catch the regression.
* aclocal.in (parse_arguments): Explicitly reject non-option arguments.
* NEWS: Update.
Signed-off-by: Stefano Lattarini <address@hidden>
---
I will push by tomorrow if there is no objection.
Regards,
Stefano
NEWS | 5 +++++
aclocal.in | 6 ++++++
t/aclocal.sh | 5 +++++
3 files changed, 16 insertions(+)
diff --git a/NEWS b/NEWS
index e7570d0..22dedaa 100644
--- a/NEWS
+++ b/NEWS
@@ -67,6 +67,11 @@ Bugs fixed in 1.12.1:
- Several weaknesses in the Automake's own build system test suite
have been fixed.
+* Bugs introduced by 1.11.3:
+
+ - When given non-option arguments, aclocal rejects them, instead of
+ silently ignoring them.
+
* Long-standing bugs:
- When the 'color-tests' option is in use, forcing of colored testsuite
diff --git a/aclocal.in b/aclocal.in
index 09e1da4..dfb851b 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -982,6 +982,12 @@ sub parse_arguments ()
use Automake::Getopt ();
Automake::Getopt::parse_options %cli_options;
+ if (@ARGV > 0)
+ {
+ fatal ("non-option arguments are not accepted: '$ARGV[0]'.\n"
+ . "Try '$0 --help' for more information.");
+ }
+
if ($print_and_exit)
{
print "@system_includes\n";
diff --git a/t/aclocal.sh b/t/aclocal.sh
index 4030b13..3e0cac6 100755
--- a/t/aclocal.sh
+++ b/t/aclocal.sh
@@ -34,6 +34,11 @@ cat stderr >&2
grep 'unrecognized option.*--unknown-option' stderr
grep '[Tt]ry.*--help.*for more information' stderr
+$ACLOCAL foobar 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'non-option argument.*foobar' stderr
+grep '[Tt]ry.*--help.*for more information' stderr
+
$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'unrecognized option.*--ver' stderr
--
1.7.9.5
- [PATCH] {maint} aclocal: error out again on unrecognized arguments,
Stefano Lattarini <=