Minor reformatting.

From-SVN: r146718
This commit is contained in:
Arnaud Charlet 2009-04-24 15:23:31 +02:00
parent 8eaf172367
commit 74744c7bda

View File

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