emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#7434: closed (When an incorrect option is used bef


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#7434: closed (When an incorrect option is used before --help/--version, automake behaviour is inconsistent with that of other GNU programs.)
Date: Mon, 25 Jun 2012 10:18:02 +0000

Your message dated Mon, 25 Jun 2012 12:13:45 +0200
with message-id <address@hidden>
and subject line Re: bug#7434: When an incorrect option is used before 
--help/--version,  automake behaviour is inconsistent with that of other GNU 
programs.
has caused the debbugs.gnu.org bug report #7434,
regarding When an incorrect option is used before --help/--version, automake 
behaviour is inconsistent with that of other GNU programs.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7434: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7434
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: When an incorrect option is used before --help/--version, automake behaviour is inconsistent with that of other GNU programs. Date: Thu, 18 Nov 2010 16:22:29 +0100 User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
Severity: wishlist

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.

But this is inconsistent with the behaviour of many others GNU/free
programs; for example:

  $ m4 --version --no-such-option; echo \$? = $?
  m4 (GNU M4) 1.4.14
  Copyright (C) 2010 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  Written by Rene' Seindal.
  $? = 0

  $ m4 --no-such-option --version; echo \$? = $?
  m4: unrecognized option '--no-such-option'
  Try `m4 --help' for more information.
  $? = 1

The same beheaviour of GNU m4 can be observed with at least GNU sed,
GNU awk, GNU coreutils, GNU bison, flex, gzip, bzip2, xz, GNU libtool,
GNU autoconf, GNU tar, Zsh, and Git.

On the other hand:
  - Bash exit with failure also in the case an invalid option is used
    *after* `--version' or `--help', but I see no reason to copy this
    behaviour, which IMHO is (slighty) suboptimal, and not at all
    widespread.
  - GCC behaves as automake and aclocal currently do, but it has always
    had a peculiar semantic of command-line scanning, for both intrinsic
    and historical reasons; so it's not a good model to follow IMHO.

In conclusion: would you agree with a patch that converts automake and
aclocal to the same cmdline-scanning behaviour of the majority of other
GNU tools?  Such a patch would also have the advantage of *simplifying*
the current code for command line parsing in automake and aclocal.

Regards,
  Stefano



--- End Message ---
--- Begin Message --- Subject: Re: bug#7434: When an incorrect option is used before --help/--version, automake behaviour is inconsistent with that of other GNU programs. Date: Mon, 25 Jun 2012 12:13:45 +0200
On 01/25/2011 06:36 PM, Stefano Lattarini wrote:
> 
> Since it seems to me that we "agreed to differ" on this issue, I'm
> tagging the report as "wontfix".
> 
Actually, all of this discussion has basically become quite moot after we
have decided to share the option parsing code between Autoconf and Automake,
and implemented that decision:

  <http://git.savannah.gnu.org/cgit/automake.git/commit/?id=52246cc7>

I'm thus closing this bug report for good now, without tagging it as "wontfix".

Regards,
  Stefano


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]