diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-31 10:19:18 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-31 10:19:18 +0000 |
commit | a723873ac68caf7f6355582fd214698aff9173d0 (patch) | |
tree | c8c87d18a9109794633d5e936943a3f76d7e949f /gcc/ada/gnatchop.adb | |
parent | 0fc62fac18791458a32a16fc74766c775ddd6a34 (diff) | |
download | gcc-a723873ac68caf7f6355582fd214698aff9173d0.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatchop.adb')
-rw-r--r-- | gcc/ada/gnatchop.adb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/ada/gnatchop.adb b/gcc/ada/gnatchop.adb index 8db06e233a6..9bd1736d3e3 100644 --- a/gcc/ada/gnatchop.adb +++ b/gcc/ada/gnatchop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2007, AdaCore -- +-- Copyright (C) 1998-2007, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,8 +36,8 @@ with GNAT.OS_Lib; use GNAT.OS_Lib; with GNAT.Heap_Sort_G; with GNAT.Table; -with Gnatvsn; with Hostparm; +with Switch; use Switch; with Types; procedure Gnatchop is @@ -1158,14 +1158,7 @@ procedure Gnatchop is when 'v' => Verbose_Mode := True; - - -- Why is following written to standard error. Most other - -- tools write to standard output ??? - - Put (Standard_Error, "GNATCHOP "); - Put_Line (Standard_Error, Gnatvsn.Gnat_Version_String); - Put_Line - (Standard_Error, "Copyright 1998-2005, AdaCore"); + Display_Version ("GNATCHOP", "1998"); when 'w' => Overwrite_Files := True; @@ -1767,6 +1760,10 @@ begin -- Process command line options and initialize global variables + -- First, scan to detect --version and/or --help + + Check_Version_And_Help ("GNATCHOP", "1998", Usage'Unrestricted_Access); + if not Scan_Arguments then Set_Exit_Status (Failure); return; |