message on invalid options.
* bin/autom4te.in (parse_args): Don't use
Autoconf::General::getopt with non valid options.
+2002-01-21 Akim Demaille <akim@epita.fr>
+
+ * lib/Autom4te/General.pm (getopt): Use a more GNUish error
+ message on invalid options.
+ * bin/autom4te.in (parse_args): Don't use
+ Autoconf::General::getopt with non valid options.
+
2002-01-17 Jim Meyering <meyering@lucent.com>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Initialize
my @language;
do {
@language = ();
+ use Getopt::Long;
Getopt::Long::Configure ("pass_through");
- getopt ("l|language=s" => \@language);
+ GetOptions ("l|language=s" => \@language);
foreach (@language)
{
# Process the arguments for real this time.
my @trace;
- Getopt::Long::Configure ("defaults");
getopt
(
# Operation modes:
# If fixed some day, use this: '' => sub { push @ARGV, "-" }
my $stdin = grep /^-$/, @ARGV;
@ARGV = grep !/^-$/, @ARGV;
- %option = (%option,
- "h|help" => sub { print $help; exit 0 },
+ %option = ("h|help" => sub { print $help; exit 0 },
"V|version" => sub { print $version; exit 0 },
"v|verbose" => \$verbose,
"d|debug" => \$debug,
'f|force' => \$force,
- );
- Getopt::Long::Configure ("bundling");
+
+ # User options last, so that they have precedence.
+ %option);
+ Getopt::Long::Configure ("bundling", "pass_through");
GetOptions (%option)
or exit 1;
+ foreach (grep { /^-./ } @ARGV)
+ {
+ print STDERR "$0: unrecognized option `$_'\n";
+ print STDERR "Try `$0 --help' for more information.\n";
+ exit (1);
+ }
+
push @ARGV, '-'
if $stdin;
}
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.24.
-.TH AUTOM4TE "1" "November 2001" "GNU Autoconf 2.52g" FSF
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.25.
+.TH AUTOM4TE "1" "January 2002" "autom4te 2.52g" "User Commands"
.SH NAME
autom4te \- Generate files and scripts thanks to M4
.SH SYNOPSIS