-- --
-- B o d y --
-- --
--- Copyright (C) 1996-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2009, 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- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- Public License distributed with GNAT; see file COPYING3. If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- kept in a more conveniently accessible form described in this
-- section.
- -- Commands, command qualifers and options have a similar common format
+ -- Commands, command qualifiers and options have a similar common format
-- so that searching for matching names can be done in a common manner.
type Item_Id is (Id_Command, Id_Switch, Id_Option);
procedure Place_Unix_Switches (S : VMS_Data.String_Ptr);
-- Given a unix switch string, place corresponding switches in Buffer,
- -- updating Ptr appropriatelly. Note that in the case of use of ! the
+ -- updating Ptr appropriately. Note that in the case of use of ! the
-- result may be to remove a previously placed switch.
procedure Preprocess_Command_Data;
Params => new Parameter_Array'(1 => Unlimited_Files),
Defext => " "),
+ Sync =>
+ (Cname => new S'("SYNC"),
+ Usage => new S'("GNAT SYNC name /qualifiers"),
+ VMS_Only => False,
+ Unixcmd => new S'("gnatsync"),
+ Unixsws => null,
+ Switches => Sync_Switches'Access,
+ Params => new Parameter_Array'(1 => Unlimited_Files),
+ Defext => " "),
+
Elim =>
(Cname => new S'("ELIM"),
Usage => new S'("GNAT ELIM name /qualifiers"),
procedure Output_Version is
begin
- Put ("GNAT ");
+ if AAMP_On_Target then
+ Put ("GNAAMP ");
+ else
+ Put ("GNAT ");
+ end if;
+
Put_Line (Gnatvsn.Gnat_Version_String);
Put_Line ("Copyright 1996-" &
Current_Year &
-- Process switch string, first get name
- while SS (P) /= ' ' and SS (P) /= '=' loop
+ while SS (P) /= ' ' and then SS (P) /= '=' loop
P := P + 1;
end loop;
then
Opt.Keep_Temporary_Files := True;
- -- Copy -switch unchanged
+ -- Copy -switch unchanged, as well as +rule
- elsif Arg (Arg'First) = '-' then
+ elsif Arg (Arg'First) = '-' or else Arg (Arg'First) = '+' then
Place (' ');
Place (Arg.all);
end if;
if Sw /= null then
- case Sw.Translation is
+ if Cargs
+ and then Sw.Name /= null
+ and then
+ (Sw.Name.all = "/PROJECT_FILE" or else
+ Sw.Name.all = "/MESSAGES_PROJECT_FILE" or else
+ Sw.Name.all = "/EXTERNAL_REFERENCE")
+ then
+ Cargs := False;
+ end if;
+ case Sw.Translation is
when T_Direct =>
Place_Unix_Switches (Sw.Unix_String);
if SwP < Arg'Last
-- end of the Argv, otherwise strings like
-- "foo/bar" get split at the slash.
- -- The begining and ending of the string
+ -- The beginning and ending of the string
-- are flagged with embedded nulls which
-- are removed when building the Spawn
-- call. Nulls are use because they won't