* automake.in (&parse_arguments): Use a more GNUish error message
authorAkim Demaille <akim@epita.fr>
Mon, 21 Jan 2002 13:55:28 +0000 (13:55 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 21 Jan 2002 13:55:28 +0000 (13:55 +0000)
on wrong options.

ChangeLog
automake.in

index ab36566..91a1484 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-21  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&parse_arguments): Use a more GNUish error message
+       on wrong options.
+
 2002-01-20  Tom Tromey  <tromey@redhat.com>
 
        Fix for PR automake/231:
index 41b1a2d..01c220f 100755 (executable)
@@ -1125,7 +1125,7 @@ sub parse_arguments ()
     &set_strictness ('gnu');
 
     use Getopt::Long;
-    Getopt::Long::config ("bundling");
+    Getopt::Long::config ("bundling", "pass_through");
     Getopt::Long::GetOptions
       (
        'version'       => \&version,
@@ -1150,6 +1150,13 @@ sub parse_arguments ()
 
     foreach my $arg (@ARGV)
     {
+      if ($arg =~ /^-./)
+       {
+         print STDERR "$0: unrecognized option `$arg'\n";
+         print STDERR "Try `$0 --help' for more information.\n";
+         exit (1);
+       }
+
       # Handle $local:$input syntax.  Note that we only examine the
       # first ":" file to see if it is automake input; the rest are
       # just taken verbatim.  We still keep all the files around for