summaryrefslogtreecommitdiff
path: root/gcc/ada/mlib-tgt-darwin.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-16 00:32:38 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-16 00:32:38 +0000
commit80b846fbfab1aa451e7122e8692de0428d592161 (patch)
tree8768f5c164a0008b471af4427a7c22c7b112b438 /gcc/ada/mlib-tgt-darwin.adb
parentffeecd4cabb19456c708ef673235d4b6b4caa9cb (diff)
downloadgcc-80b846fbfab1aa451e7122e8692de0428d592161.tar.gz
* mlib-tgt-darwin.adb (Library_Exist_For, Library_File_Name_For):
Add new parameter In_Tree to specify the project tree: needed by the project manager. Adapt to changes in project manager using new parameter In_Tree. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96545 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-tgt-darwin.adb')
-rw-r--r--gcc/ada/mlib-tgt-darwin.adb29
1 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ada/mlib-tgt-darwin.adb b/gcc/ada/mlib-tgt-darwin.adb
index 96a41e4d03c..1b168a9d7b8 100644
--- a/gcc/ada/mlib-tgt-darwin.adb
+++ b/gcc/ada/mlib-tgt-darwin.adb
@@ -266,9 +266,11 @@ package body MLib.Tgt is
-- Library_Exists_For --
------------------------
- function Library_Exists_For (Project : Project_Id) return Boolean is
+ function Library_Exists_For
+ (Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean
+ is
begin
- if not Projects.Table (Project).Library then
+ if not In_Tree.Projects.Table (Project).Library then
Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project");
return False;
@@ -276,12 +278,16 @@ package body MLib.Tgt is
else
declare
Lib_Dir : constant String :=
- Get_Name_String (Projects.Table (Project).Library_Dir);
+ Get_Name_String
+ (In_Tree.Projects.Table (Project).Library_Dir);
Lib_Name : constant String :=
- Get_Name_String (Projects.Table (Project).Library_Name);
+ Get_Name_String
+ (In_Tree.Projects.Table (Project).Library_Name);
begin
- if Projects.Table (Project).Library_Kind = Static then
+ if In_Tree.Projects.Table (Project).Library_Kind =
+ Static
+ then
return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext));
@@ -299,9 +305,12 @@ package body MLib.Tgt is
-- Library_File_Name_For --
---------------------------
- function Library_File_Name_For (Project : Project_Id) return Name_Id is
+ function Library_File_Name_For
+ (Project : Project_Id;
+ In_Tree : Project_Tree_Ref) return Name_Id
+ is
begin
- if not Projects.Table (Project).Library then
+ if not In_Tree.Projects.Table (Project).Library then
Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project");
return No_Name;
@@ -309,13 +318,15 @@ package body MLib.Tgt is
else
declare
Lib_Name : constant String :=
- Get_Name_String (Projects.Table (Project).Library_Name);
+ Get_Name_String
+ (In_Tree.Projects.Table (Project).Library_Name);
begin
Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib";
- if Projects.Table (Project).Library_Kind = Static then
+ if In_Tree.Projects.Table (Project).Library_Kind =
+ Static then
Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else