Commit 74744c7b by Arnaud Charlet

Minor reformatting.

From-SVN: r146718
parent 8eaf1723
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2004-2008, Free Software Foundation, Inc. -- -- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -100,6 +100,7 @@ package body Makeutl is ...@@ -100,6 +100,7 @@ package body Makeutl is
declare declare
New_Options : constant String_List_Access := New_Options : constant String_List_Access :=
new String_List (1 .. To'Last * 2); new String_List (1 .. To'Last * 2);
begin begin
New_Options (To'Range) := To.all; New_Options (To'Range) := To.all;
...@@ -195,10 +196,10 @@ package body Makeutl is ...@@ -195,10 +196,10 @@ package body Makeutl is
Exec_Name : constant String := Command_Name; Exec_Name : constant String := Command_Name;
function Get_Install_Dir (S : String) return String; function Get_Install_Dir (S : String) return String;
-- S is the executable name preceded by the absolute or relative -- S is the executable name preceded by the absolute or relative path,
-- path, e.g. "c:\usr\bin\gcc.exe". Returns the absolute directory -- e.g. "c:\usr\bin\gcc.exe". Returns the absolute directory where "bin"
-- where "bin" lies (in the example "C:\usr"). -- lies (in the example "C:\usr"). If the executable is not in a "bin"
-- If the executable is not in a "bin" directory, return "". -- directory, return "".
--------------------- ---------------------
-- Get_Install_Dir -- -- Get_Install_Dir --
...@@ -332,9 +333,7 @@ package body Makeutl is ...@@ -332,9 +333,7 @@ package body Makeutl is
Equal_Pos := Equal_Pos + 1; Equal_Pos := Equal_Pos + 1;
end loop; end loop;
if Equal_Pos = Start if Equal_Pos = Start or else Equal_Pos > Finish then
or else Equal_Pos > Finish
then
return False; return False;
else else
Prj.Ext.Add Prj.Ext.Add
...@@ -373,6 +372,7 @@ package body Makeutl is ...@@ -373,6 +372,7 @@ package body Makeutl is
procedure Recursive_Add (Proj : Project_Id; Dummy : in out Boolean) is procedure Recursive_Add (Proj : Project_Id; Dummy : in out Boolean) is
pragma Unreferenced (Dummy); pragma Unreferenced (Dummy);
Data : Project_Data renames In_Tree.Projects.Table (Proj); Data : Project_Data renames In_Tree.Projects.Table (Proj);
Linker_Package : Package_Id; Linker_Package : Package_Id;
Options : Variable_Value; Options : Variable_Value;
...@@ -383,6 +383,7 @@ package body Makeutl is ...@@ -383,6 +383,7 @@ package body Makeutl is
(Name => Name_Linker, (Name => Name_Linker,
In_Packages => Data.Decl.Packages, In_Packages => Data.Decl.Packages,
In_Tree => In_Tree); In_Tree => In_Tree);
Options := Options :=
Prj.Util.Value_Of Prj.Util.Value_Of
(Name => Name_Ada, (Name => Name_Ada,
...@@ -403,6 +404,7 @@ package body Makeutl is ...@@ -403,6 +404,7 @@ package body Makeutl is
procedure For_All_Projects is procedure For_All_Projects is
new For_Every_Project_Imported (Boolean, Recursive_Add); new For_Every_Project_Imported (Boolean, Recursive_Add);
Dummy : Boolean := False; Dummy : Boolean := False;
-- Start of processing for Linker_Options_Switches -- Start of processing for Linker_Options_Switches
...@@ -418,7 +420,7 @@ package body Makeutl is ...@@ -418,7 +420,7 @@ package body Makeutl is
declare declare
Options : String_List_Id := Linker_Opts.Table (Index).Options; Options : String_List_Id := Linker_Opts.Table (Index).Options;
Proj : constant Project_Id := Proj : constant Project_Id :=
Linker_Opts.Table (Index).Project; Linker_Opts.Table (Index).Project;
Option : Name_Id; Option : Name_Id;
begin begin
...@@ -432,8 +434,7 @@ package body Makeutl is ...@@ -432,8 +434,7 @@ package body Makeutl is
end if; end if;
while Options /= Nil_String loop while Options /= Nil_String loop
Option := Option := In_Tree.String_Elements.Table (Options).Value;
In_Tree.String_Elements.Table (Options).Value;
Get_Name_String (Option); Get_Name_String (Option);
-- Do not consider empty linker options -- Do not consider empty linker options
...@@ -445,10 +446,8 @@ package body Makeutl is ...@@ -445,10 +446,8 @@ package body Makeutl is
-- paths must be converted to absolute paths. -- paths must be converted to absolute paths.
Test_If_Relative_Path Test_If_Relative_Path
(Switch => (Switch => Linker_Options_Buffer (Last_Linker_Option),
Linker_Options_Buffer (Last_Linker_Option), Parent => In_Tree.Projects.Table (Proj).Dir_Path,
Parent =>
In_Tree.Projects.Table (Proj).Dir_Path,
Including_L_Switch => True); Including_L_Switch => True);
end if; end if;
...@@ -612,7 +611,7 @@ package body Makeutl is ...@@ -612,7 +611,7 @@ package body Makeutl is
begin begin
if Switch /= null then if Switch /= null then
declare declare
Sw : String (1 .. Switch'Length); Sw : String (1 .. Switch'Length);
Start : Positive; Start : Positive;
begin begin
...@@ -621,8 +620,8 @@ package body Makeutl is ...@@ -621,8 +620,8 @@ package body Makeutl is
if Sw (1) = '-' then if Sw (1) = '-' then
if Sw'Length >= 3 if Sw'Length >= 3
and then (Sw (2) = 'A' and then (Sw (2) = 'A'
or else Sw (2) = 'I' or else Sw (2) = 'I'
or else (Including_L_Switch and then Sw (2) = 'L')) or else (Including_L_Switch and then Sw (2) = 'L'))
then then
Start := 3; Start := 3;
...@@ -632,8 +631,8 @@ package body Makeutl is ...@@ -632,8 +631,8 @@ package body Makeutl is
elsif Sw'Length >= 4 elsif Sw'Length >= 4
and then (Sw (2 .. 3) = "aL" and then (Sw (2 .. 3) = "aL"
or else Sw (2 .. 3) = "aO" or else Sw (2 .. 3) = "aO"
or else Sw (2 .. 3) = "aI") or else Sw (2 .. 3) = "aI")
then then
Start := 4; Start := 4;
...@@ -667,7 +666,6 @@ package body Makeutl is ...@@ -667,7 +666,6 @@ package body Makeutl is
if Parent = null or else Parent'Length = 0 then if Parent = null or else Parent'Length = 0 then
Do_Fail Do_Fail
("relative paths (""" & Sw & """) are not allowed"); ("relative paths (""" & Sw & """) are not allowed");
else else
Switch := Switch :=
new String'(Parent.all & Directory_Separator & Sw); new String'(Parent.all & Directory_Separator & Sw);
...@@ -711,9 +709,9 @@ package body Makeutl is ...@@ -711,9 +709,9 @@ package body Makeutl is
Start := Start - 1; Start := Start - 1;
end loop; end loop;
-- If there are no digits, or if the digits are not preceded by -- If there are no digits, or if the digits are not preceded by the
-- the character that precedes a unit index, this is not the ALI file -- character that precedes a unit index, this is not the ALI file of
-- of a unit in a multi-unit source. -- a unit in a multi-unit source.
if Start > Finish if Start > Finish
or else Start = 1 or else Start = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment