Starting from commit v1.11-662-g52246cc of 2102-02-18, "cmdline parsing:
move into a dedicated perl module", 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 <stefano.lattarini@gmail.com>
- 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
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";
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