summaryrefslogtreecommitdiffstats
path: root/gcc/ada/gprep.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-31 10:19:18 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-31 10:19:18 +0000
commita723873ac68caf7f6355582fd214698aff9173d0 (patch)
treec8c87d18a9109794633d5e936943a3f76d7e949f /gcc/ada/gprep.adb
parent0fc62fac18791458a32a16fc74766c775ddd6a34 (diff)
downloadppe42-gcc-a723873ac68caf7f6355582fd214698aff9173d0.tar.gz
ppe42-gcc-a723873ac68caf7f6355582fd214698aff9173d0.zip
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/gprep.adb')
-rw-r--r--gcc/ada/gprep.adb19
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/ada/gprep.adb b/gcc/ada/gprep.adb
index a951b5a5a54..26194aed796 100644
--- a/gcc/ada/gprep.adb
+++ b/gcc/ada/gprep.adb
@@ -27,7 +27,6 @@
with Csets;
with Err_Vars; use Err_Vars;
with Errutil;
-with Gnatvsn; use Gnatvsn;
with Namet; use Namet;
with Opt;
with Osint; use Osint;
@@ -37,15 +36,16 @@ with Scng;
with Sinput.C;
with Snames;
with Stringt; use Stringt;
+with Switch; use Switch;
with Types; use Types;
-with Ada.Text_IO; use Ada.Text_IO;
+with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.Command_Line;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
-with System.OS_Lib; use System.OS_Lib;
+with System.OS_Lib; use System.OS_Lib;
package body GPrep is
@@ -138,10 +138,7 @@ package body GPrep is
procedure Display_Copyright is
begin
if not Copyright_Displayed then
- Write_Line ("GNAT Preprocessor " & Gnatvsn.Gnat_Version_String);
- Write_Line ("Copyright 1996-" &
- Current_Year &
- ", Free Software Foundation, Inc.");
+ Display_Version ("GNAT Preprocessor", "1996");
Copyright_Displayed := True;
end if;
end Display_Copyright;
@@ -704,7 +701,13 @@ package body GPrep is
Switch : Character;
begin
- -- Parse the switches
+ -- First check for --version or --help
+
+ Check_Version_And_Help ("GNATPREP", "1996", Usage'Access);
+
+ -- Now scan the other switches
+
+ GNAT.Command_Line.Initialize_Option_Scan;
loop
begin
OpenPOWER on IntegriCloud