The various gnat* programs now included in GCC do not support the --help and --version options, which the GNU Coding Standards say they should. Release: 3.1 20011027 (experimental) Environment: System: Linux digraph 2.2.19 #1 Sun Oct 21 10:19:10 UTC 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-cvs/configure --prefix=/opt/gcc/mainline --disable-shared --enable-threads=posix --with-system-zlib How-To-Repeat: gnatbind --version (for example)
Fix: Make all these programs support --help and --version, with the output as described by the GNU Coding Standards (including how both the GNAT and GCC version numbers can be included in the output).
Hello, this problem is still present on all gcc branches. Dara
Any idea who to contact about this? I thought we required documentation for all components of gcc, and I certainly don't see why Ada should be different.
Subject: Re: GNAT programs do not support --help and --version On Sun, 6 Jul 2003, dhazeghi at yahoo dot com wrote: > Any idea who to contact about this? I thought we required documentation > for all components of gcc, and I certainly don't see why Ada should be > different. It's the Ada maintainers who should be dealing with this. It isn't a GCC-specific requirement here; supporting --help and --version is a requirement of the GNU Coding Standards, so all GNU programs should support them with output in the correct format.
(In reply to comment #4) > GCC-specific requirement here; supporting --help and --version is a > requirement of the GNU Coding Standards, so all GNU programs should > support them with output in the correct format. ..and the correct channel(std) - not stderr. So you could use '|less' to read the help screen, which you get *twice* if you enter 'gnatmake -h', BTW.
Subject: Bug 4720 Author: charlet Date: Fri Aug 31 10:19:18 2007 New Revision: 127967 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127967 Log: 2007-08-30 Vincent Celier <celier@adacore.com> PR ada/4720 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb (Check_Version_And_Help): New procedure in package Switch to process switches --version and --help. Use Check_Version_And_Help in GNAT tools * make.adb: Ditto. (Compile_Sources): Make sure that sources that are "excluded" are not compiled. (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a project file is used. (Version_Switch): Remove, moved to Switch (Help_Switch): Remove, moved to Switch (Display_Version): Remove, moved to Switch * switch.ads, switch.adb (Check_Version_And_Help): New procedure in package Switch to process switches --version and --help. (Display_Version): New procedure * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function. Modified: trunk/gcc/ada/clean.adb trunk/gcc/ada/gnatbind.adb trunk/gcc/ada/gnatchop.adb trunk/gcc/ada/gnatfind.adb trunk/gcc/ada/gnatlink.adb trunk/gcc/ada/gnatls.adb trunk/gcc/ada/gnatname.adb trunk/gcc/ada/gnatvsn.adb trunk/gcc/ada/gnatvsn.ads trunk/gcc/ada/gnatxref.adb trunk/gcc/ada/gprep.adb trunk/gcc/ada/make.adb trunk/gcc/ada/switch.adb trunk/gcc/ada/switch.ads
This is now fixed.