-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-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- --
------------------------------------------------------------------------------
with Debug; use Debug;
+with Makeutl; use Makeutl;
with Osint; use Osint;
with Opt; use Opt;
with Prj; use Prj;
if Switches = null then
Switches := new Argument_List (1 .. Initial_Number_Of_Switches);
- -- otherwise, if Switches is full, extend it
+ -- Otherwise, if Switches is full, extend it
elsif Last = Switches'Last then
declare
end if;
end if;
+ -- Loop through remaining switch characters in string
+
while Ptr <= Max loop
C := Switch_Chars (Ptr);
Ptr := Ptr + 1;
(Storing (Storing'First .. Last_Stored));
end if;
- -- All other switches are -gnatxx
+ -- --gnatx.x
+
+ elsif C = '.' and then Ptr <= Max then
+ Storing (First_Stored + 1) := '.';
+ Storing (First_Stored + 2) := Switch_Chars (Ptr);
+ Ptr := Ptr + 1;
+ Add_Switch_Component
+ (Storing (Storing'First .. First_Stored + 2));
+
+ -- All other switches are -gnatxx
else
Storing (First_Stored + 1) := C;
end Normalize_Compiler_Switches;
function Normalize_Compiler_Switches
- (Switch_Chars : String)
- return Argument_List
+ (Switch_Chars : String) return Argument_List
is
Last : Natural;
else
return Global_Switches (Global_Switches'First .. Last);
end if;
-
end Normalize_Compiler_Switches;
------------------------
------------------------
procedure Scan_Make_Switches
- (Switch_Chars : String;
- Success : out Boolean)
+ (Project_Node_Tree : Prj.Tree.Project_Node_Tree_Ref;
+ Switch_Chars : String;
+ Success : out Boolean)
is
Ptr : Integer := Switch_Chars'First;
Max : constant Integer := Switch_Chars'Last;
and then Switch_Chars (Ptr .. Ptr + 1) = "aP"
then
Add_Search_Project_Directory
- (Switch_Chars (Ptr + 2 .. Switch_Chars'Last));
+ (Project_Node_Tree,
+ Switch_Chars (Ptr + 2 .. Switch_Chars'Last));
elsif C = 'v' and then Switch_Chars'Length = 3 then
Ptr := Ptr + 1;
else
Follow_Links_For_Files := True;
+ Follow_Links_For_Dirs := True;
end if;
-- Processing for eS switch