GNU bug report logs - #7434
When an incorrect option is used before --help/--version, automake behaviour is inconsistent with that of other GNU programs.

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Thu, 18 Nov 2010 15:30:03 UTC

Severity: minor

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 7434 <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>
Subject: bug#7434: When an incorrect option is used before --help/--version, automake behaviour is inconsistent with that of other GNU programs.
Date: Thu, 18 Nov 2010 21:26:16 +0100
Hello,

* Stefano Lattarini wrote on Thu, Nov 18, 2010 at 05:28:30PM CET:
> On Thursday 18 November 2010, Eric Blake wrote:
> > On 11/18/2010 08:22 AM, Stefano Lattarini wrote:
> > > Currently, automake and aclocal scan their command line looking for
> > > `--help' and `--version' even after an invalid option has been seen;
> > > and in case one of those two options is seen, it takes precedence
> > > even over error reporting about preceding invalid options.
> > 
> > GNU Coding Standards _only_ require that --help and --version be
> > recognized as the first argument, with no other arguments.
> > When possible, recognizing --help and --version after other arguments,
> > or with other arguments afterwards, is nice, but there are no rules
> > that require that consistency.

> Not exactly.  The GNU Coding Standards read (my emphasis):
> 
>   ``The standard --version option should direct the program to print
>     information about its name, version, origin and legal status, all
>     on standard output, and then exit successfully. Other options and
>     arguments should be ignored *once this is seen*, and the program
>     should not perform its normal function.''
> 
> So it means that the behaviour of GNU m4 (and the other mentioned
> programs) is compliant with the GCS, while the automake behaviour
> is "overzealous" in this respect.

I think the GCS should be adjusted then.  IIUC then GNU has valued
usability over implementation simplicity.  I think --help should work
whereever it is put on a command line, except after -- or right after an
option which requires an argument (or at least GCS should allow for this
behavior).  The point being that I type

$ foo --zork --barf
foo: blabla error, see --help

and then type <up><space>--help<enter> to find out more.

Let's address this on bug-standards before changing any programs.

Thanks,
Ralf




This bug report was last modified 12 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.