Commit 7e98a4c6 by Vincent Celier Committed by Arnaud Charlet

mlib-tgt-tru64.adb, [...] (Library_Exist_For, [...]): Add new parameter In_Tree…

mlib-tgt-tru64.adb, [...] (Library_Exist_For, [...]): Add new parameter In_Tree to specify the project tree...

2005-03-08  Vincent Celier  <celier@adacore.com>

	* mlib-tgt-tru64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
	mlib-tgt-hpux.adb, mlib-tgt-linux.adb, mlib-tgt-solaris.adb,
	mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb, mlib-tgt-mingw.adb,
	mlib-tgt-vxworks.adb, mlib-tgt-lynxos.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.
	Remove local imports, use functions in System.CRTL.

	* make.adb, clean.adb, gnatcmd.adb (Project_Tree): New constant needed
	to use the project manager.

	* makeutl.ads, makeutl.adb (Linker_Options_Switches): New parameter
	In_Tree to designate the project tree. Adapt to changes in the project
	manager, using In_Tree.

	* mlib-prj.ads, mlib-prj.adb (Build_Library, Check_Library,
	Copy_Interface_Sources): Add new parameter In_Tree to specify the
	project tree: needed by the project manager.
	(Build_Library): Check that Arg'Length >= 6 before checking if it
	contains "--RTS=...".

	* mlib-tgt.ads, mlib-tgt.adb (Library_Exist_For,
	Library_File_Name_For): Add new parameter In_Tree to specify the
	project tree: needed by the project manager.

	* prj.ads, prj.adb: Major modifications to allow several project trees
	in memory at the same time.
	Change tables to dynamic tables and hash tables to dynamic hash
	tables. Move tables and hash tables from Prj.Com (in the visible part)
	and Prj.Env (in the private part). Move some constants from the visible
	part to the private part. Make other constants deferred.
	(Project_Empty): Make it a variable, not a function
	(Empty_Project): Add parameter Tree. Returns the data with the default
	naming data of the project tree Tree.
	(Initialize): After updating Std_Naming_Data, copy its value to the
	component Naming of Project Empty.
	(Register_Default_Naming_Scheme): Use and update the default naming
	component of the project tree, instead of the global variable
	Std_Naming_Data.
	(Standard_Naming_Data): Add defaulted parameter Tree. If project tree
	Tree is not defaulted, return the default naming data of the Tree.
	(Initial_Buffer_Size): Constant moved from private part
	(Default_Ada_Spec_Suffix_Id, Default_Ada_Body_Suffix_Id, Slash_Id); new
	variables initialized in procedure Initialize.
	(Add_To_Buffer): Add two in out parameters to replace global variables
	Buffer and Buffer_Last.
	(Default_Ada_Spec_Suffix, Default_Body_Spec_Suffix, Slash): New
	functions.
	Adapt to changes to use new type Project_Tree_Ref and dynamic tables and
	hash tables.
	(Initialize, Reset, register-Default_Namng-Scheme): Add a new parameter
	for the project tree.
	(Project_Tree_Data, Project_Tree_Ref, No_Project): Declare types and
	constant at the beginning of the package spec, so that they cane be used
	in subprograms before their full declarations.
	(Standard_Naming_Data): Add defaulted parameter of type Project_Node_Ref
	(Empty_Project): Add parameter of type Project_Node_Ref
	(Private_Project_Tree_Data): Add component Default_Naming of type
	Naming_Data.
	(Buffer, Buffer_Last): remove global variables
	(Add_To_Buffer): Add two in out parameters to replace global variables
	Buffer and Buffer_Last.
	(Current_Packages_To_Check): Remove global variable
	(Empty_Name): Move to private part
	(No-Symbols): Make it a constant
	(Private_Project_Tree_Data): New type for the private part of the
	project tree data.
	(Project_Tree_Data): New type for the data of a project tree
	(Project_Tree_Ref): New type to designate a project tree
	(Initialize, Reset, register-Default_Namng-Scheme): Add a new parameter
	for the project tree.

	* prj-attr.ads: Add with Table; needed, as package Prj no longer
	imports package Table.

	* prj-com.adb: Remove empty, no longer needed body

	* prj-com.ads: Move most of the content of this package to package Prj.

	* prj-dect.ads, prj-dect.adb (Parse): New parameters In_Tree to
	designate the project node tree and Packages_To_Check to replace
	global variable Current_Packages_To_Check.
	Add new parameters In_Tree and Packages_To_Check to local subprograms,
	when needed. Adapt to changes in project manager with project node tree
	In_Tree.

	* prj-env.ads, prj-env.adb: Add new parameter In_Tree to designate the
	project tree to most subprograms. Move tables and hash tables to
	private part of package Prj.
	Adapt to changes in project manager using project tree In_Tree.

	* prj-makr.adb (Tree): New constant to designate the project node tree
	Adapt to change in project manager using project node tree Tree

	* prj-nmsc.ads, prj-nmsc.adb (Check_Stand_Alone_Library): Correctly
	display the Library_Src_Dir and the Library_Dir.
	Add new parameter In_Tree to designate the project node tree to most
	subprograms. Adapt to changes in the project manager, using project tree
	In_Tree.
	(Check_Naming_Scheme): Do not alter the casing on platforms where
	the casing of file names is not significant.
	(Check): Add new parameter In_Tree to designate the

	* prj-pars.ads, prj-pars.adb (Parse): Add new parameter In_Tree to
	designate the project tree.
	Declare a project node tree to call Prj.Part.Parse and Prj.Proc.Process

	* prj-part.ads, prj-part.adb (Buffer, Buffer_Last): Global variables,
	to replace those that were in the private part of package Prj.
	Add new parameter In__Tree to designate the project node tree to most
	subprograms. Adapt to change in Prj.Tree with project node tree In_Tree.
	(Post_Parse_Context_Clause): When specifying the project node of a with
	clause, indicate that it is a limited with only if there is "limited"
	in the with clause, not necessarily when In_Limited is True.
	(Parse): Add new parameter In_Tree to designate the project node tree

	* prj-pp.ads, prj-pp.adb (Pretty_Print): Add new parameter In_Tree to
	designate the project node tree. Adapt to change in Prj.Tree with
	project node tree In_Tree.

	* prj-proc.ads, prj-proc.adb (Recursive_Process): Specify the project
	tree In_Tree in the call to function Empty_Process to give its initial
	value to the project data Processed_Data.
	Add new parameters In_Tree to designate the project tree and
	From_Project_Node_Tree to designate the project node tree to several
	subprograms. Adapt to change in project manager with project tree
	In_Tree and project node tree From_Project_Node_Tree.

	* prj-strt.ads, prj-strt.adb (Buffer, Buffer_Last): Global variables,
	to replace those that were in the private part of package Prj.
	Add new parameter In_Tree to designate the project node tree to most
	subprograms. Adapt to change in Prj.Tree with project node tree In_Tree.

	* prj-tree.ads, prj-tree.adb: Add new parameter of type
	Project_Node_Tree_Ref to most subprograms.
	Use this new parameter to store project nodes in the designated project
	node tree.
	(Project_Node_Tree_Ref): New type to designate a project node tree
	(Tree_Private_Part): Change table to dynamic table and hash tables to
	dynamic hash tables.

	* prj-util.ads, prj-util.adb: Add new parameter In_Tree to designate
	the project tree to most subprograms. Adapt to changes in project
	manager using project tree In_Tree.

	* makegpr.adb (Project_Tree): New constant needed to use project
	manager.

From-SVN: r96481
parent 0ca89db7
...@@ -37,7 +37,6 @@ with Opt; use Opt; ...@@ -37,7 +37,6 @@ with Opt; use Opt;
with Osint; use Osint; with Osint; use Osint;
with Osint.M; use Osint.M; with Osint.M; use Osint.M;
with Prj; use Prj; with Prj; use Prj;
with Prj.Com;
with Prj.Env; with Prj.Env;
with Prj.Ext; with Prj.Ext;
with Prj.Pars; with Prj.Pars;
...@@ -92,6 +91,8 @@ package body Clean is ...@@ -92,6 +91,8 @@ package body Clean is
Project_File_Name : String_Access := null; Project_File_Name : String_Access := null;
Project_Tree : constant Prj.Project_Tree_Ref := new Prj.Project_Tree_Data;
Main_Project : Prj.Project_Id := Prj.No_Project; Main_Project : Prj.Project_Id := Prj.No_Project;
All_Projects : Boolean := False; All_Projects : Boolean := False;
...@@ -328,7 +329,8 @@ package body Clean is ...@@ -328,7 +329,8 @@ package body Clean is
procedure Clean_Archive (Project : Project_Id) is procedure Clean_Archive (Project : Project_Id) is
Current_Dir : constant Dir_Name_Str := Get_Current_Dir; Current_Dir : constant Dir_Name_Str := Get_Current_Dir;
Data : constant Project_Data := Projects.Table (Project); Data : constant Project_Data :=
Project_Tree.Projects.Table (Project);
Archive_Name : constant String := Archive_Name : constant String :=
"lib" & Get_Name_String (Data.Name) & '.' & Archive_Ext; "lib" & Get_Name_String (Data.Name) & '.' & Archive_Ext;
...@@ -560,8 +562,9 @@ package body Clean is ...@@ -560,8 +562,9 @@ package body Clean is
-- Name of the executable file -- Name of the executable file
Current_Dir : constant Dir_Name_Str := Get_Current_Dir; Current_Dir : constant Dir_Name_Str := Get_Current_Dir;
Data : constant Project_Data := Projects.Table (Project); Data : constant Project_Data :=
U_Data : Prj.Com.Unit_Data; Project_Tree.Projects.Table (Project);
U_Data : Unit_Data;
File_Name1 : Name_Id; File_Name1 : Name_Id;
Index1 : Int; Index1 : Int;
File_Name2 : Name_Id; File_Name2 : Name_Id;
...@@ -573,8 +576,6 @@ package body Clean is ...@@ -573,8 +576,6 @@ package body Clean is
Global_Archive : Boolean := False; Global_Archive : Boolean := False;
use Prj.Com;
begin begin
-- Check that we don't specify executable on the command line for -- Check that we don't specify executable on the command line for
-- a main library project. -- a main library project.
...@@ -612,8 +613,10 @@ package body Clean is ...@@ -612,8 +613,10 @@ package body Clean is
-- sources or inherited sources of the project. -- sources or inherited sources of the project.
if Data.Languages (Ada_Language_Index) then if Data.Languages (Ada_Language_Index) then
for Unit in 1 .. Prj.Com.Units.Last loop for Unit in Unit_Table.First ..
U_Data := Prj.Com.Units.Table (Unit); Unit_Table.Last (Project_Tree.Units)
loop
U_Data := Project_Tree.Units.Table (Unit);
File_Name1 := No_Name; File_Name1 := No_Name;
File_Name2 := No_Name; File_Name2 := No_Name;
...@@ -749,8 +752,12 @@ package body Clean is ...@@ -749,8 +752,12 @@ package body Clean is
if Project = Main_Project and then not Data.Library then if Project = Main_Project and then not Data.Library then
Global_Archive := False; Global_Archive := False;
for Proj in 1 .. Projects.Last loop for Proj in Project_Table.First ..
if Projects.Table (Proj).Other_Sources_Present then Project_Table.Last (Project_Tree.Projects)
loop
if Project_Tree.Projects.Table
(Proj).Other_Sources_Present
then
Global_Archive := True; Global_Archive := True;
exit; exit;
end if; end if;
...@@ -769,7 +776,8 @@ package body Clean is ...@@ -769,7 +776,8 @@ package body Clean is
Source_Id := Data.First_Other_Source; Source_Id := Data.First_Other_Source;
while Source_Id /= No_Other_Source loop while Source_Id /= No_Other_Source loop
Source := Other_Sources.Table (Source_Id); Source :=
Project_Tree.Other_Sources.Table (Source_Id);
if Is_Regular_File if Is_Regular_File
(Get_Name_String (Source.Object_Name)) (Get_Name_String (Source.Object_Name))
...@@ -839,7 +847,7 @@ package body Clean is ...@@ -839,7 +847,7 @@ package body Clean is
-- has not been processed already. -- has not been processed already.
while Imported /= Empty_Project_List loop while Imported /= Empty_Project_List loop
Element := Project_Lists.Table (Imported); Element := Project_Tree.Project_Lists.Table (Imported);
Imported := Element.Next; Imported := Element.Next;
Process := True; Process := True;
...@@ -887,6 +895,7 @@ package body Clean is ...@@ -887,6 +895,7 @@ package body Clean is
Executable := Executable :=
Executable_Of Executable_Of
(Main_Project, (Main_Project,
Project_Tree,
Main_Source_File, Main_Source_File,
Current_File_Index); Current_File_Index);
...@@ -1099,13 +1108,14 @@ package body Clean is ...@@ -1099,13 +1108,14 @@ package body Clean is
-- Set the project parsing verbosity to whatever was specified -- Set the project parsing verbosity to whatever was specified
-- by a possible -vP switch. -- by a possible -vP switch.
Prj.Pars.Set_Verbosity (To => Prj.Com.Current_Verbosity); Prj.Pars.Set_Verbosity (To => Current_Verbosity);
-- Parse the project file. If there is an error, Main_Project -- Parse the project file. If there is an error, Main_Project
-- will still be No_Project. -- will still be No_Project.
Prj.Pars.Parse Prj.Pars.Parse
(Project => Main_Project, (Project => Main_Project,
In_Tree => Project_Tree,
Project_File_Name => Project_File_Name.all, Project_File_Name => Project_File_Name.all,
Packages_To_Check => Packages_To_Check_By_Gnatmake); Packages_To_Check => Packages_To_Check_By_Gnatmake);
...@@ -1121,12 +1131,10 @@ package body Clean is ...@@ -1121,12 +1131,10 @@ package body Clean is
New_Line; New_Line;
end if; end if;
-- We add the source directories and the object directories -- Add source directories and object directories to the search paths
-- to the search paths.
Add_Source_Directories (Main_Project);
Add_Object_Directories (Main_Project);
Add_Source_Directories (Main_Project, Project_Tree);
Add_Object_Directories (Main_Project, Project_Tree);
end if; end if;
Osint.Add_Default_Search_Dirs; Osint.Add_Default_Search_Dirs;
...@@ -1137,11 +1145,12 @@ package body Clean is ...@@ -1137,11 +1145,12 @@ package body Clean is
if Main_Project /= No_Project and then Osint.Number_Of_Files = 0 then if Main_Project /= No_Project and then Osint.Number_Of_Files = 0 then
declare declare
Value : String_List_Id := Projects.Table (Main_Project).Mains; Value : String_List_Id :=
Project_Tree.Projects.Table (Main_Project).Mains;
Main : String_Element; Main : String_Element;
begin begin
while Value /= Prj.Nil_String loop while Value /= Prj.Nil_String loop
Main := String_Elements.Table (Value); Main := Project_Tree.String_Elements.Table (Value);
Osint.Add_File Osint.Add_File
(File_Name => Get_Name_String (Main.Value), (File_Name => Get_Name_String (Main.Value),
Index => Main.Index); Index => Main.Index);
...@@ -1211,24 +1220,24 @@ package body Clean is ...@@ -1211,24 +1220,24 @@ package body Clean is
return True; return True;
end if; end if;
Data := Projects.Table (Of_Project); Data := Project_Tree.Projects.Table (Of_Project);
while Data.Extends /= No_Project loop while Data.Extends /= No_Project loop
if Data.Extends = Prj then if Data.Extends = Prj then
return True; return True;
end if; end if;
Data := Projects.Table (Data.Extends); Data := Project_Tree.Projects.Table (Data.Extends);
end loop; end loop;
Data := Projects.Table (Prj); Data := Project_Tree.Projects.Table (Prj);
while Data.Extends /= No_Project loop while Data.Extends /= No_Project loop
if Data.Extends = Of_Project then if Data.Extends = Of_Project then
return True; return True;
end if; end if;
Data := Projects.Table (Data.Extends); Data := Project_Tree.Projects.Table (Data.Extends);
end loop; end loop;
return False; return False;
...@@ -1258,7 +1267,7 @@ package body Clean is ...@@ -1258,7 +1267,7 @@ package body Clean is
Csets.Initialize; Csets.Initialize;
Namet.Initialize; Namet.Initialize;
Snames.Initialize; Snames.Initialize;
Prj.Initialize; Prj.Initialize (Project_Tree);
end if; end if;
-- Reset global variables -- Reset global variables
...@@ -1480,13 +1489,13 @@ package body Clean is ...@@ -1480,13 +1489,13 @@ package body Clean is
Verbose_Mode := True; Verbose_Mode := True;
elsif Arg = "-vP0" then elsif Arg = "-vP0" then
Prj.Com.Current_Verbosity := Prj.Default; Current_Verbosity := Prj.Default;
elsif Arg = "-vP1" then elsif Arg = "-vP1" then
Prj.Com.Current_Verbosity := Prj.Medium; Current_Verbosity := Prj.Medium;
elsif Arg = "-vP2" then elsif Arg = "-vP2" then
Prj.Com.Current_Verbosity := Prj.High; Current_Verbosity := Prj.High;
else else
Bad_Argument; Bad_Argument;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2004 Free Software Foundation, Inc. -- -- Copyright (C) 2004-2005 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- --
...@@ -185,7 +185,8 @@ package body Makeutl is ...@@ -185,7 +185,8 @@ package body Makeutl is
----------------------------- -----------------------------
function Linker_Options_Switches function Linker_Options_Switches
(Project : Project_Id) return String_List (Project : Project_Id;
In_Tree : Project_Tree_Ref) return String_List
is is
procedure Recursive_Add_Linker_Options (Proj : Project_Id); procedure Recursive_Add_Linker_Options (Proj : Project_Id);
-- The recursive routine used to add linker options -- The recursive routine used to add linker options
...@@ -202,29 +203,33 @@ package body Makeutl is ...@@ -202,29 +203,33 @@ package body Makeutl is
begin begin
if Proj /= No_Project then if Proj /= No_Project then
Data := Projects.Table (Proj); Data := In_Tree.Projects.Table (Proj);
if not Data.Seen then if not Data.Seen then
Projects.Table (Proj).Seen := True; In_Tree.Projects.Table (Proj).Seen := True;
Imported := Data.Imported_Projects; Imported := Data.Imported_Projects;
while Imported /= Empty_Project_List loop while Imported /= Empty_Project_List loop
Recursive_Add_Linker_Options Recursive_Add_Linker_Options
(Project_Lists.Table (Imported).Project); (In_Tree.Project_Lists.Table
Imported := Project_Lists.Table (Imported).Next; (Imported).Project);
Imported := In_Tree.Project_Lists.Table
(Imported).Next;
end loop; end loop;
if Proj /= Project then if Proj /= Project then
Linker_Package := Linker_Package :=
Prj.Util.Value_Of Prj.Util.Value_Of
(Name => Name_Linker, (Name => Name_Linker,
In_Packages => Data.Decl.Packages); In_Packages => Data.Decl.Packages,
In_Tree => In_Tree);
Options := Options :=
Prj.Util.Value_Of Prj.Util.Value_Of
(Name => Name_Ada, (Name => Name_Ada,
Index => 0, Index => 0,
Attribute_Or_Array_Name => Name_Linker_Options, Attribute_Or_Array_Name => Name_Linker_Options,
In_Package => Linker_Package); In_Package => Linker_Package,
In_Tree => In_Tree);
-- If attribute is present, add the project with -- If attribute is present, add the project with
-- the attribute to table Linker_Opts. -- the attribute to table Linker_Opts.
...@@ -244,8 +249,10 @@ package body Makeutl is ...@@ -244,8 +249,10 @@ package body Makeutl is
begin begin
Linker_Opts.Init; Linker_Opts.Init;
for Index in 1 .. Projects.Last loop for Index in Project_Table.First ..
Projects.Table (Index).Seen := False; Project_Table.Last (In_Tree.Projects)
loop
In_Tree.Projects.Table (Index).Seen := False;
end loop; end loop;
Recursive_Add_Linker_Options (Project); Recursive_Add_Linker_Options (Project);
...@@ -262,15 +269,19 @@ package body Makeutl is ...@@ -262,15 +269,19 @@ package body Makeutl is
begin begin
-- If Dir_Path has not been computed for this project, do it now -- If Dir_Path has not been computed for this project, do it now
if Projects.Table (Proj).Dir_Path = null then if In_Tree.Projects.Table (Proj).Dir_Path = null then
Projects.Table (Proj).Dir_Path := In_Tree.Projects.Table (Proj).Dir_Path :=
new String' new String'
(Get_Name_String (Projects.Table (Proj). Directory)); (Get_Name_String
(In_Tree.Projects.Table
(Proj). Directory));
end if; end if;
while Options /= Nil_String loop while Options /= Nil_String loop
Option := String_Elements.Table (Options).Value; Option :=
Options := String_Elements.Table (Options).Next; In_Tree.String_Elements.Table (Options).Value;
Options :=
In_Tree.String_Elements.Table (Options).Next;
Add_Linker_Option (Get_Name_String (Option)); Add_Linker_Option (Get_Name_String (Option));
-- Object files and -L switches specified with -- Object files and -L switches specified with
...@@ -280,7 +291,8 @@ package body Makeutl is ...@@ -280,7 +291,8 @@ package body Makeutl is
Test_If_Relative_Path Test_If_Relative_Path
(Switch => (Switch =>
Linker_Options_Buffer (Last_Linker_Option), Linker_Options_Buffer (Last_Linker_Option),
Parent => Projects.Table (Proj).Dir_Path, Parent =>
In_Tree.Projects.Table (Proj).Dir_Path,
Including_L_Switch => True); Including_L_Switch => True);
end loop; end loop;
end; end;
...@@ -326,7 +338,7 @@ package body Makeutl is ...@@ -326,7 +338,7 @@ package body Makeutl is
procedure Delete is procedure Delete is
begin begin
Names.Set_Last (0); Names.Set_Last (0);
Reset; Mains.Reset;
end Delete; end Delete;
--------------- ---------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2004 Free Software Foundation, Inc. -- -- Copyright (C) 2004-2005 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- --
...@@ -56,8 +56,13 @@ package Makeutl is ...@@ -56,8 +56,13 @@ package Makeutl is
-- been entered by a call to Prj.Ext.Add, so that in a project -- been entered by a call to Prj.Ext.Add, so that in a project
-- file, External ("name") will return "value". -- file, External ("name") will return "value".
function Linker_Options_Switches (Project : Project_Id) return String_List; function Linker_Options_Switches
-- Comment required ??? (Project : Project_Id;
In_Tree : Project_Tree_Ref) return String_List;
-- Collect the options specified in the Linker'Linker_Options attributes
-- of project Project, in project tree In_Tree, and in the projects that
-- it imports directly or indirectly, and returns the result.
-- Package Mains is used to store the mains specified on the command line -- Package Mains is used to store the mains specified on the command line
-- and to retrieve them when a project file is used, to verify that the -- and to retrieve them when a project file is used, to verify that the
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2003, Ada Core Technologies, Inc. -- -- Copyright (C) 2001-2005, Ada Core Technologies, 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- --
...@@ -32,6 +32,7 @@ package MLib.Prj is ...@@ -32,6 +32,7 @@ package MLib.Prj is
procedure Build_Library procedure Build_Library
(For_Project : Project_Id; (For_Project : Project_Id;
In_Tree : Project_Tree_Ref;
Gnatbind : String; Gnatbind : String;
Gnatbind_Path : String_Access; Gnatbind_Path : String_Access;
Gcc : String; Gcc : String;
...@@ -45,7 +46,8 @@ package MLib.Prj is ...@@ -45,7 +46,8 @@ package MLib.Prj is
-- files. If Bind is False the binding of a stand-alone library is skipped. -- files. If Bind is False the binding of a stand-alone library is skipped.
-- If Link is False, the library is not linked/built. -- If Link is False, the library is not linked/built.
procedure Check_Library (For_Project : Project_Id); procedure Check_Library
(For_Project : Project_Id; In_Tree : Project_Tree_Ref);
-- Check if the library of a library project needs to be rebuilt, -- Check if the library of a library project needs to be rebuilt,
-- because its time-stamp is earlier than the time stamp of one of its -- because its time-stamp is earlier than the time stamp of one of its
-- object files. -- object files.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2003-2004, Ada Core Technologies, Inc. -- -- Copyright (C) 2003-2005, Ada Core Technologies, 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- --
...@@ -286,9 +286,11 @@ package body MLib.Tgt is ...@@ -286,9 +286,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -297,13 +299,16 @@ package body MLib.Tgt is ...@@ -297,13 +299,16 @@ package body MLib.Tgt is
declare declare
Lib_Dir : constant String := Lib_Dir : constant String :=
Get_Name_String Get_Name_String
(Projects.Table (Project).Library_Dir); (In_Tree.Projects.Table (Project).Library_Dir);
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String Get_Name_String
(Projects.Table (Project).Library_Name); (In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -321,9 +326,12 @@ package body MLib.Tgt is ...@@ -321,9 +326,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -331,13 +339,16 @@ package body MLib.Tgt is ...@@ -331,13 +339,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
...@@ -382,7 +393,7 @@ package body MLib.Tgt is ...@@ -382,7 +393,7 @@ package body MLib.Tgt is
function Support_For_Libraries return Library_Support is function Support_For_Libraries return Library_Support is
begin begin
return Full; return Static_Only;
end Support_For_Libraries; end Support_For_Libraries;
end MLib.Tgt; end MLib.Tgt;
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2003-2004, Ada Core Technologies, Inc. -- -- Copyright (C) 2003-2005, Ada Core Technologies, 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- --
...@@ -269,9 +269,11 @@ package body MLib.Tgt is ...@@ -269,9 +269,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -279,12 +281,16 @@ package body MLib.Tgt is ...@@ -279,12 +281,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -302,9 +308,12 @@ package body MLib.Tgt is ...@@ -302,9 +308,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -312,13 +321,16 @@ package body MLib.Tgt is ...@@ -312,13 +321,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2003-2004, Ada Core Technologies, Inc. -- -- Copyright (C) 2003-2005, Ada Core Technologies, 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- --
...@@ -309,9 +309,11 @@ package body MLib.Tgt is ...@@ -309,9 +309,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -319,12 +321,16 @@ package body MLib.Tgt is ...@@ -319,12 +321,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -342,9 +348,12 @@ package body MLib.Tgt is ...@@ -342,9 +348,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -352,13 +361,16 @@ package body MLib.Tgt is ...@@ -352,13 +361,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2004, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005, 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- --
...@@ -266,9 +266,11 @@ package body MLib.Tgt is ...@@ -266,9 +266,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -276,12 +278,16 @@ package body MLib.Tgt is ...@@ -276,12 +278,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -299,9 +305,12 @@ package body MLib.Tgt is ...@@ -299,9 +305,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -309,13 +318,16 @@ package body MLib.Tgt is ...@@ -309,13 +318,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2003-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2003-2005 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- --
...@@ -174,9 +174,11 @@ package body MLib.Tgt is ...@@ -174,9 +174,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -184,12 +186,16 @@ package body MLib.Tgt is ...@@ -184,12 +186,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -207,9 +213,12 @@ package body MLib.Tgt is ...@@ -207,9 +213,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -217,13 +226,16 @@ package body MLib.Tgt is ...@@ -217,13 +226,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2002-2004, Free Software Foundation, Inc. -- -- Copyright (C) 2002-2005, 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- --
...@@ -194,9 +194,11 @@ package body MLib.Tgt is ...@@ -194,9 +194,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -205,13 +207,15 @@ package body MLib.Tgt is ...@@ -205,13 +207,15 @@ package body MLib.Tgt is
declare declare
Lib_Dir : constant String := Lib_Dir : constant String :=
Get_Name_String Get_Name_String
(Projects.Table (Project).Library_Dir); (In_Tree.Projects.Table (Project).Library_Dir);
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String Get_Name_String
(Projects.Table (Project).Library_Name); (In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
MLib.Fil.Ext_To (Lib_Name, Archive_Ext)); MLib.Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -229,9 +233,12 @@ package body MLib.Tgt is ...@@ -229,9 +233,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -239,10 +246,13 @@ package body MLib.Tgt is ...@@ -239,10 +246,13 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; Name_Buffer (1 .. Name_Len) := "lib";
Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2002-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2002-2005 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- --
...@@ -263,9 +263,11 @@ package body MLib.Tgt is ...@@ -263,9 +263,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -273,12 +275,16 @@ package body MLib.Tgt is ...@@ -273,12 +275,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -296,9 +302,12 @@ package body MLib.Tgt is ...@@ -296,9 +302,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -306,13 +315,16 @@ package body MLib.Tgt is ...@@ -306,13 +315,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2002-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2002-2005 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- --
...@@ -280,9 +280,11 @@ package body MLib.Tgt is ...@@ -280,9 +280,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -290,12 +292,16 @@ package body MLib.Tgt is ...@@ -290,12 +292,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -313,9 +319,12 @@ package body MLib.Tgt is ...@@ -313,9 +319,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -323,13 +332,16 @@ package body MLib.Tgt is ...@@ -323,13 +332,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2003-2004, Free Software Foundation, Inc. -- -- Copyright (C) 2003-2005, 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- --
...@@ -38,8 +38,10 @@ with Namet; use Namet; ...@@ -38,8 +38,10 @@ with Namet; use Namet;
with Opt; use Opt; with Opt; use Opt;
with Output; use Output; with Output; use Output;
with Prj.Com; with Prj.Com;
with System; use System; with System; use System;
with System.Case_Util; use System.Case_Util; with System.Case_Util; use System.Case_Util;
with System.CRTL; use System.CRTL;
package body MLib.Tgt is package body MLib.Tgt is
...@@ -72,16 +74,6 @@ package body MLib.Tgt is ...@@ -72,16 +74,6 @@ package body MLib.Tgt is
Link_With_Shared_Libgcc : Argument_List_Access := Link_With_Shared_Libgcc : Argument_List_Access :=
No_Shared_Libgcc_Switch'Access; No_Shared_Libgcc_Switch'Access;
------------------------------
-- Target dependent section --
------------------------------
function Popen (Command, Mode : System.Address) return System.Address;
pragma Import (C, Popen);
function Pclose (File : System.Address) return Integer;
pragma Import (C, Pclose);
--------------------- ---------------------
-- Archive_Builder -- -- Archive_Builder --
--------------------- ---------------------
...@@ -302,12 +294,12 @@ package body MLib.Tgt is ...@@ -302,12 +294,12 @@ package body MLib.Tgt is
Len : Natural; Len : Natural;
OK : Boolean := True; OK : Boolean := True;
Command : constant String := command : constant String :=
Macro_Name & " " & Macro_File_Name & ASCII.NUL; Macro_Name & " " & Macro_File_Name & ASCII.NUL;
-- The command to invoke the assembler on the generated auto-init -- The command to invoke the assembler on the generated auto-init
-- assembly file. -- assembly file.
Mode : constant String := "r" & ASCII.NUL; mode : constant String := "r" & ASCII.NUL;
-- The mode for the invocation of Popen -- The mode for the invocation of Popen
begin begin
...@@ -365,8 +357,8 @@ package body MLib.Tgt is ...@@ -365,8 +357,8 @@ package body MLib.Tgt is
Write_Line (""""); Write_Line ("""");
end if; end if;
Popen_Result := Popen (Command (Command'First)'Address, Popen_Result := popen (command (command'First)'Address,
Mode (Mode'First)'Address); mode (mode'First)'Address);
if Popen_Result = Null_Address then if Popen_Result = Null_Address then
Fail ("assembly of auto-init assembly file """, Fail ("assembly of auto-init assembly file """,
...@@ -375,7 +367,7 @@ package body MLib.Tgt is ...@@ -375,7 +367,7 @@ package body MLib.Tgt is
-- Wait for the end of execution of the macro-assembler -- Wait for the end of execution of the macro-assembler
Pclose_Result := Pclose (Popen_Result); Pclose_Result := pclose (Popen_Result);
if Pclose_Result < 0 then if Pclose_Result < 0 then
Fail ("assembly of auto init assembly file """, Fail ("assembly of auto init assembly file """,
...@@ -604,9 +596,11 @@ package body MLib.Tgt is ...@@ -604,9 +596,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 begin
if not Projects.Table (Project).Library then if not In_Tree.Projects.Table (Project).Library then
Fail ("INTERNAL ERROR: Library_Exists_For called " & Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -614,12 +608,16 @@ package body MLib.Tgt is ...@@ -614,12 +608,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -637,9 +635,12 @@ package body MLib.Tgt is ...@@ -637,9 +635,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -647,13 +648,16 @@ package body MLib.Tgt is ...@@ -647,13 +648,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -38,8 +38,10 @@ with Namet; use Namet; ...@@ -38,8 +38,10 @@ with Namet; use Namet;
with Opt; use Opt; with Opt; use Opt;
with Output; use Output; with Output; use Output;
with Prj.Com; with Prj.Com;
with System; use System; with System; use System;
with System.Case_Util; use System.Case_Util; with System.Case_Util; use System.Case_Util;
with System.CRTL; use System.CRTL;
package body MLib.Tgt is package body MLib.Tgt is
...@@ -72,16 +74,6 @@ package body MLib.Tgt is ...@@ -72,16 +74,6 @@ package body MLib.Tgt is
Link_With_Shared_Libgcc : Argument_List_Access := Link_With_Shared_Libgcc : Argument_List_Access :=
No_Shared_Libgcc_Switch'Access; No_Shared_Libgcc_Switch'Access;
------------------------------
-- Target dependent section --
------------------------------
function Popen (Command, Mode : System.Address) return System.Address;
pragma Import (C, Popen, "decc$popen");
function Pclose (File : System.Address) return Integer;
pragma Import (C, Pclose, "decc$pclose");
--------------------- ---------------------
-- Archive_Builder -- -- Archive_Builder --
--------------------- ---------------------
...@@ -300,12 +292,12 @@ package body MLib.Tgt is ...@@ -300,12 +292,12 @@ package body MLib.Tgt is
Len : Natural; Len : Natural;
OK : Boolean := True; OK : Boolean := True;
Command : constant String := command : constant String :=
Macro_Name & " " & Macro_File_Name & ASCII.NUL; Macro_Name & " " & Macro_File_Name & ASCII.NUL;
-- The command to invoke the assembler on the generated auto-init -- The command to invoke the assembler on the generated auto-init
-- assembly file. -- assembly file.
Mode : constant String := "r" & ASCII.NUL; mode : constant String := "r" & ASCII.NUL;
-- The mode for the invocation of Popen -- The mode for the invocation of Popen
begin begin
...@@ -398,8 +390,8 @@ package body MLib.Tgt is ...@@ -398,8 +390,8 @@ package body MLib.Tgt is
Write_Line (""""); Write_Line ("""");
end if; end if;
Popen_Result := Popen (Command (Command'First)'Address, Popen_Result := popen (command (command'First)'Address,
Mode (Mode'First)'Address); mode (mode'First)'Address);
if Popen_Result = Null_Address then if Popen_Result = Null_Address then
Fail ("assembly of auto-init assembly file """, Fail ("assembly of auto-init assembly file """,
...@@ -408,7 +400,7 @@ package body MLib.Tgt is ...@@ -408,7 +400,7 @@ package body MLib.Tgt is
-- Wait for the end of execution of the macro-assembler -- Wait for the end of execution of the macro-assembler
Pclose_Result := Pclose (Popen_Result); Pclose_Result := pclose (Popen_Result);
if Pclose_Result < 0 then if Pclose_Result < 0 then
Fail ("assembly of auto init assembly file """, Fail ("assembly of auto init assembly file """,
...@@ -637,9 +629,11 @@ package body MLib.Tgt is ...@@ -637,9 +629,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 begin
if not Projects.Table (Project).Library then if not In_Tree.Projects.Table (Project).Library then
Fail ("INTERNAL ERROR: Library_Exists_For called " & Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -647,12 +641,16 @@ package body MLib.Tgt is ...@@ -647,12 +641,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -670,9 +668,12 @@ package body MLib.Tgt is ...@@ -670,9 +668,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -680,13 +681,15 @@ package body MLib.Tgt is ...@@ -680,13 +681,15 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2003-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2003-2005 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- --
...@@ -215,9 +215,11 @@ package body MLib.Tgt is ...@@ -215,9 +215,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project"); "for non library project");
return False; return False;
...@@ -225,12 +227,16 @@ package body MLib.Tgt is ...@@ -225,12 +227,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Dir : constant String := 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 := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
if Projects.Table (Project).Library_Kind = Static then if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" & (Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext)); Fil.Ext_To (Lib_Name, Archive_Ext));
...@@ -248,9 +254,12 @@ package body MLib.Tgt is ...@@ -248,9 +254,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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 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 " & Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project"); "for non library project");
return No_Name; return No_Name;
...@@ -258,13 +267,16 @@ package body MLib.Tgt is ...@@ -258,13 +267,16 @@ package body MLib.Tgt is
else else
declare declare
Lib_Name : constant String := Lib_Name : constant String :=
Get_Name_String (Projects.Table (Project).Library_Name); Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin begin
Name_Len := 3; Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib"; 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)); Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2004, Ada Core Technologies, Inc. -- -- Copyright (C) 2001-2005, Ada Core Technologies, 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- --
...@@ -172,8 +172,11 @@ package body MLib.Tgt is ...@@ -172,8 +172,11 @@ package body MLib.Tgt is
-- Library_Exists_For -- -- 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
pragma Unreferenced (Project); pragma Unreferenced (Project);
pragma Unreferenced (In_Tree);
begin begin
return False; return False;
end Library_Exists_For; end Library_Exists_For;
...@@ -182,8 +185,12 @@ package body MLib.Tgt is ...@@ -182,8 +185,12 @@ package body MLib.Tgt is
-- Library_File_Name_For -- -- 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
pragma Unreferenced (Project); pragma Unreferenced (Project);
pragma Unreferenced (In_Tree);
begin begin
return No_Name; return No_Name;
end Library_File_Name_For; end Library_File_Name_For;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2004, Ada Core Technologies, Inc. -- -- Copyright (C) 2001-2005, Ada Core Technologies, 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- --
...@@ -147,11 +147,14 @@ package MLib.Tgt is ...@@ -147,11 +147,14 @@ package MLib.Tgt is
-- into account. For example, on Linux, Foreign, Afiles Lib_Address and -- into account. For example, on Linux, Foreign, Afiles Lib_Address and
-- Relocatable are ignored. -- Relocatable are ignored.
function Library_Exists_For (Project : Project_Id) return Boolean; function Library_Exists_For
(Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean;
-- Return True if the library file for a library project already exists. -- Return True if the library file for a library project already exists.
-- This function can only be called for library projects. -- This function can only be called for library projects.
function Library_File_Name_For (Project : Project_Id) return Name_Id; function Library_File_Name_For
(Project : Project_Id;
In_Tree : Project_Tree_Ref) return Name_Id;
-- Returns the file name of the library file of a library project. -- Returns the file name of the library file of a library project.
-- This function can only be called for library projects. -- This function can only be called for library projects.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
-- There are predefined packages and attributes. -- There are predefined packages and attributes.
-- It is also possible to define new packages with their attributes. -- It is also possible to define new packages with their attributes.
with Table;
with Types; use Types; with Types; use Types;
package Prj.Attr is package Prj.Attr is
......
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . C O M --
-- --
-- B o d y --
-- --
-- Copyright (C) 2000-2004 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- --
-- 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, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Namet; use Namet;
with Stringt; use Stringt;
package body Prj.Com is
----------
-- Hash --
----------
function Hash (Name : String_Id) return Header_Num is
begin
String_To_Name_Buffer (Name);
return Hash (Name_Buffer (1 .. Name_Len));
end Hash;
end Prj.Com;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2000-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2000-2005 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- --
...@@ -27,88 +27,18 @@ ...@@ -27,88 +27,18 @@
-- The following package declares data types for GNAT project. -- The following package declares data types for GNAT project.
-- These data types are used in the bodies of the Prj hierarchy. -- These data types are used in the bodies of the Prj hierarchy.
with GNAT.HTable;
with Osint; with Osint;
with Table;
with Types; use Types;
package Prj.Com is package Prj.Com is
-- At one point, this package was private.
-- It cannot be private, because it is used outside of
-- the Prj hierarchy.
type Fail_Proc is access procedure type Fail_Proc is access procedure
(S1 : String; S2 : String := ""; S3 : String := ""); (S1 : String;
S2 : String := "";
S3 : String := "");
Fail : Fail_Proc := Osint.Fail'Access; Fail : Fail_Proc := Osint.Fail'Access;
-- This procedure is used in the project facility, instead of -- This procedure is used in the project facility, instead of directly
-- directly calling Osint.Fail. -- calling Osint.Fail. It may be specified by tools to do clean up before
-- It may be specified by tools to do clean up before calling -- calling Osint.Fail, or to simply report an error and return.
-- Osint.Fail, or to simply report an error and return.
Tool_Name : Name_Id := No_Name;
Current_Verbosity : Verbosity := Default;
type Spec_Or_Body is
(Specification, Body_Part);
type File_Name_Data is record
Name : Name_Id := No_Name;
Index : Int := 0;
Display_Name : Name_Id := No_Name;
Path : Name_Id := No_Name;
Display_Path : Name_Id := No_Name;
Project : Project_Id := No_Project;
Needs_Pragma : Boolean := False;
end record;
-- File and Path name of a spec or body.
type File_Names_Data is array (Spec_Or_Body) of File_Name_Data;
type Unit_Id is new Nat;
No_Unit : constant Unit_Id := 0;
type Unit_Data is record
Name : Name_Id := No_Name;
File_Names : File_Names_Data;
end record;
-- File and Path names of a unit, with a reference to its
-- GNAT Project File.
package Units is new Table.Table
(Table_Component_Type => Unit_Data,
Table_Index_Type => Unit_Id,
Table_Low_Bound => 1,
Table_Initial => 100,
Table_Increment => 100,
Table_Name => "Prj.Com.Units");
function Hash (Name : String_Id) return Header_Num;
package Units_Htable is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num,
Element => Unit_Id,
No_Element => No_Unit,
Key => Name_Id,
Hash => Hash,
Equal => "=");
-- Mapping of unit names to indexes in the Units table
type Unit_Project is record
Unit : Unit_Id := No_Unit;
Project : Project_Id := No_Project;
end record;
No_Unit_Project : constant Unit_Project := (No_Unit, No_Project);
package Files_Htable is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num,
Element => Unit_Project,
No_Element => No_Unit_Project,
Key => Name_Id,
Hash => Hash,
Equal => "=");
-- Mapping of file names to indexes in the Units table
end Prj.Com; end Prj.Com;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2003 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -31,9 +31,27 @@ with Prj.Tree; ...@@ -31,9 +31,27 @@ with Prj.Tree;
private package Prj.Dect is private package Prj.Dect is
procedure Parse procedure Parse
(Declarations : out Prj.Tree.Project_Node_Id; (In_Tree : Prj.Tree.Project_Node_Tree_Ref;
Declarations : out Prj.Tree.Project_Node_Id;
Current_Project : Prj.Tree.Project_Node_Id; Current_Project : Prj.Tree.Project_Node_Id;
Extends : Prj.Tree.Project_Node_Id); Extends : Prj.Tree.Project_Node_Id;
-- Parse project declarative items. What are parameters ??? Packages_To_Check : String_List_Access);
-- Parse project declarative items
--
-- In_Tree is the project node tree
--
-- Declarations is the resulting project node
--
-- Current_Project is the project node of the project for which the
-- declarative items are parsed.
--
-- Extends is the project node of the project that project Current_Project
-- extends. If project Current-Project does not extend any project,
-- Extends has the value Empty_Node.
--
-- Packages_To_Check is the list of packages that needs to be checked.
-- For legal packages declared in project Current_Project that are not in
-- Packages_To_Check, only the syntax of the declarations are checked, not
-- the attribute names and kinds.
end Prj.Dect; end Prj.Dect;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc -- -- Copyright (C) 2001-2005 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- --
...@@ -32,14 +32,15 @@ with GNAT.OS_Lib; use GNAT.OS_Lib; ...@@ -32,14 +32,15 @@ with GNAT.OS_Lib; use GNAT.OS_Lib;
package Prj.Env is package Prj.Env is
procedure Initialize; procedure Initialize;
-- Called by Prj.Initialize to perform required initialization -- Called by Prj.Initialize to perform required initialization steps for
-- steps for this package. -- this package.
procedure Print_Sources; procedure Print_Sources (In_Tree : Project_Tree_Ref);
-- Output the list of sources, after Project files have been scanned -- Output the list of sources, after Project files have been scanned
procedure Create_Mapping_File procedure Create_Mapping_File
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Name : out Name_Id); Name : out Name_Id);
-- Create a temporary mapping file for project Project. For each unit -- Create a temporary mapping file for project Project. For each unit
-- in the closure of immediate sources of Project, put the mapping of -- in the closure of immediate sources of Project, put the mapping of
...@@ -52,6 +53,7 @@ package Prj.Env is ...@@ -52,6 +53,7 @@ package Prj.Env is
procedure Create_Config_Pragmas_File procedure Create_Config_Pragmas_File
(For_Project : Project_Id; (For_Project : Project_Id;
Main_Project : Project_Id; Main_Project : Project_Id;
In_Tree : Project_Tree_Ref;
Include_Config_Files : Boolean := True); Include_Config_Files : Boolean := True);
-- If there needs to have SFN pragmas, either for non standard naming -- If there needs to have SFN pragmas, either for non standard naming
-- schemes or for individual units, or (when Include_Config_Files is True) -- schemes or for individual units, or (when Include_Config_Files is True)
...@@ -61,12 +63,15 @@ package Prj.Env is ...@@ -61,12 +63,15 @@ package Prj.Env is
-- a temporary file that contains all configuration pragmas, and specify -- a temporary file that contains all configuration pragmas, and specify
-- the configuration pragmas file in the project data. -- the configuration pragmas file in the project data.
function Ada_Include_Path (Project : Project_Id) return String_Access; function Ada_Include_Path
(Project : Project_Id;
In_Tree : Project_Tree_Ref) return String_Access;
-- Get the ADA_INCLUDE_PATH of a Project file. For the first call, compute -- Get the ADA_INCLUDE_PATH of a Project file. For the first call, compute
-- it and cache it. -- it and cache it.
function Ada_Include_Path function Ada_Include_Path
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Recursive : Boolean) return String; Recursive : Boolean) return String;
-- Get the ADA_INCLUDE_PATH of a Project file. If Recursive it True, -- Get the ADA_INCLUDE_PATH of a Project file. If Recursive it True,
-- get all the source directories of the imported and modified project -- get all the source directories of the imported and modified project
...@@ -76,6 +81,7 @@ package Prj.Env is ...@@ -76,6 +81,7 @@ package Prj.Env is
function Ada_Objects_Path function Ada_Objects_Path
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Including_Libraries : Boolean := True) return String_Access; Including_Libraries : Boolean := True) return String_Access;
-- Get the ADA_OBJECTS_PATH of a Project file. For the first call, compute -- Get the ADA_OBJECTS_PATH of a Project file. For the first call, compute
-- it and cache it. When Including_Libraries is False, do not include the -- it and cache it. When Including_Libraries is False, do not include the
...@@ -83,22 +89,25 @@ package Prj.Env is ...@@ -83,22 +89,25 @@ package Prj.Env is
procedure Set_Ada_Paths procedure Set_Ada_Paths
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Including_Libraries : Boolean); Including_Libraries : Boolean);
-- Set the env vars for additional project path files, after -- Set the env vars for additional project path files, after
-- creating the path files if necessary. -- creating the path files if necessary.
procedure Delete_All_Path_Files; procedure Delete_All_Path_Files (In_Tree : Project_Tree_Ref);
-- Delete all temporary path files that have been created by -- Delete all temporary path files that have been created by
-- calls to Set_Ada_Paths. -- calls to Set_Ada_Paths.
function Path_Name_Of_Library_Unit_Body function Path_Name_Of_Library_Unit_Body
(Name : String; (Name : String;
Project : Project_Id) return String; Project : Project_Id;
In_Tree : Project_Tree_Ref) return String;
-- Returns the Path of a library unit -- Returns the Path of a library unit
function File_Name_Of_Library_Unit_Body function File_Name_Of_Library_Unit_Body
(Name : String; (Name : String;
Project : Project_Id; Project : Project_Id;
In_Tree : Project_Tree_Ref;
Main_Project_Only : Boolean := True; Main_Project_Only : Boolean := True;
Full_Path : Boolean := False) return String; Full_Path : Boolean := False) return String;
-- Returns the file name of a library unit, in canonical case. Name may or -- Returns the file name of a library unit, in canonical case. Name may or
...@@ -117,7 +126,8 @@ package Prj.Env is ...@@ -117,7 +126,8 @@ package Prj.Env is
function Project_Of function Project_Of
(Name : String; (Name : String;
Main_Project : Project_Id) return Project_Id; Main_Project : Project_Id;
In_Tree : Project_Tree_Ref) return Project_Id;
-- Get the project of a source. The source file name may be truncated -- Get the project of a source. The source file name may be truncated
-- (".adb" or ".ads" may be missing). If the source is in a project being -- (".adb" or ".ads" may be missing). If the source is in a project being
-- extended, return the ultimate extending project. If it is not a source -- extended, return the ultimate extending project. If it is not a source
...@@ -125,20 +135,25 @@ package Prj.Env is ...@@ -125,20 +135,25 @@ package Prj.Env is
procedure Get_Reference procedure Get_Reference
(Source_File_Name : String; (Source_File_Name : String;
In_Tree : Project_Tree_Ref;
Project : out Project_Id; Project : out Project_Id;
Path : out Name_Id); Path : out Name_Id);
-- Returns the project of a source and its path in displayable form -- Returns the project of a source and its path in displayable form
generic generic
with procedure Action (Path : String); with procedure Action (Path : String);
procedure For_All_Source_Dirs (Project : Project_Id); procedure For_All_Source_Dirs
-- Iterate through all the source directories of a project, (Project : Project_Id;
-- including those of imported or modified projects. In_Tree : Project_Tree_Ref);
-- Iterate through all the source directories of a project, including
-- those of imported or modified projects.
generic generic
with procedure Action (Path : String); with procedure Action (Path : String);
procedure For_All_Object_Dirs (Project : Project_Id); procedure For_All_Object_Dirs
-- Iterate through all the object directories of a project, (Project : Project_Id;
-- including those of imported or modified projects. In_Tree : Project_Tree_Ref);
-- Iterate through all the object directories of a project, including
-- those of imported or modified projects.
end Prj.Env; end Prj.Env;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2000-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2000-2005 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- --
...@@ -34,6 +34,7 @@ private package Prj.Nmsc is ...@@ -34,6 +34,7 @@ private package Prj.Nmsc is
procedure Check procedure Check
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Report_Error : Put_Line_Access; Report_Error : Put_Line_Access;
Follow_Links : Boolean); Follow_Links : Boolean);
-- Check the object directory and the source directories -- Check the object directory and the source directories
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -28,7 +28,6 @@ with Ada.Exceptions; use Ada.Exceptions; ...@@ -28,7 +28,6 @@ with Ada.Exceptions; use Ada.Exceptions;
with Opt; with Opt;
with Output; use Output; with Output; use Output;
with Prj.Com; use Prj.Com;
with Prj.Err; use Prj.Err; with Prj.Err; use Prj.Err;
with Prj.Part; with Prj.Part;
with Prj.Proc; with Prj.Proc;
...@@ -41,30 +40,38 @@ package body Prj.Pars is ...@@ -41,30 +40,38 @@ package body Prj.Pars is
----------- -----------
procedure Parse procedure Parse
(Project : out Project_Id; (In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Project_File_Name : String; Project_File_Name : String;
Packages_To_Check : String_List_Access := All_Packages) Packages_To_Check : String_List_Access := All_Packages)
is is
Project_Tree : Project_Node_Id := Empty_Node; Project_Node_Tree : constant Project_Node_Tree_Ref :=
new Project_Node_Tree_Data;
Project_Node : Project_Node_Id := Empty_Node;
The_Project : Project_Id := No_Project; The_Project : Project_Id := No_Project;
Success : Boolean := True; Success : Boolean := True;
begin begin
Prj.Tree.Initialize (Project_Node_Tree);
-- Parse the main project file into a tree -- Parse the main project file into a tree
Prj.Part.Parse Prj.Part.Parse
(Project => Project_Tree, (In_Tree => Project_Node_Tree,
Project => Project_Node,
Project_File_Name => Project_File_Name, Project_File_Name => Project_File_Name,
Always_Errout_Finalize => False, Always_Errout_Finalize => False,
Packages_To_Check => Packages_To_Check); Packages_To_Check => Packages_To_Check);
-- If there were no error, process the tree -- If there were no error, process the tree
if Project_Tree /= Empty_Node then if Project_Node /= Empty_Node then
Prj.Proc.Process Prj.Proc.Process
(Project => The_Project, (In_Tree => In_Tree,
Project => The_Project,
Success => Success, Success => Success,
From_Project_Node => Project_Tree, From_Project_Node => Project_Node,
From_Project_Node_Tree => Project_Node_Tree,
Report_Error => null, Report_Error => null,
Follow_Links => Opt.Follow_Links); Follow_Links => Opt.Follow_Links);
Prj.Err.Finalize; Prj.Err.Finalize;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2000-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2000-2005 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- --
...@@ -34,10 +34,12 @@ package Prj.Pars is ...@@ -34,10 +34,12 @@ package Prj.Pars is
-- Set the verbosity when parsing the project files -- Set the verbosity when parsing the project files
procedure Parse procedure Parse
(Project : out Project_Id; (In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Project_File_Name : String; Project_File_Name : String;
Packages_To_Check : String_List_Access := All_Packages); Packages_To_Check : String_List_Access := All_Packages);
-- Parse a project files and all its imported project files. -- Parse a project files and all its imported project files, in the
-- project tree In_Tree.
-- --
-- If parsing is successful, Project_Id is the project ID -- If parsing is successful, Project_Id is the project ID
-- of the main project file; otherwise, Project_Id is set -- of the main project file; otherwise, Project_Id is set
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2000-2003 Free Software Foundation, Inc. -- -- Copyright (C) 2000-2005 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- --
...@@ -31,7 +31,8 @@ with Prj.Tree; use Prj.Tree; ...@@ -31,7 +31,8 @@ with Prj.Tree; use Prj.Tree;
package Prj.Part is package Prj.Part is
procedure Parse procedure Parse
(Project : out Project_Node_Id; (In_Tree : Project_Node_Tree_Ref;
Project : out Project_Node_Id;
Project_File_Name : String; Project_File_Name : String;
Always_Errout_Finalize : Boolean; Always_Errout_Finalize : Boolean;
Packages_To_Check : String_List_Access := All_Packages; Packages_To_Check : String_List_Access := All_Packages;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2003 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
-- This package is the Project File Pretty Printer. -- This package is the Project File Pretty Printer.
-- It is used to output a project file from a project file tree. -- It is used to output a project file from a project file tree.
-- It is used by gnatname to update or create project files. -- It is used by gnatname to update or create project files.
-- It is also used GLIDE2 to display project file trees. -- It is also used GPS to display project file trees.
-- It can also be used for debugging purposes for tools that create project -- It can also be used for debugging purposes for tools that create project
-- file trees. -- file trees.
...@@ -46,6 +46,7 @@ package Prj.PP is ...@@ -46,6 +46,7 @@ package Prj.PP is
procedure Pretty_Print procedure Pretty_Print
(Project : Prj.Tree.Project_Node_Id; (Project : Prj.Tree.Project_Node_Id;
In_Tree : Prj.Tree.Project_Node_Tree_Ref;
Increment : Positive := 3; Increment : Positive := 3;
Eliminate_Empty_Case_Constructions : Boolean := False; Eliminate_Empty_Case_Constructions : Boolean := False;
Minimize_Empty_Lines : Boolean := False; Minimize_Empty_Lines : Boolean := False;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -33,9 +33,11 @@ with Prj.Tree; use Prj.Tree; ...@@ -33,9 +33,11 @@ with Prj.Tree; use Prj.Tree;
package Prj.Proc is package Prj.Proc is
procedure Process procedure Process
(Project : out Project_Id; (In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Success : out Boolean; Success : out Boolean;
From_Project_Node : Project_Node_Id; From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Report_Error : Put_Line_Access; Report_Error : Put_Line_Access;
Follow_Links : Boolean := True); Follow_Links : Boolean := True);
-- Process a project file tree into project file data structures. -- Process a project file tree into project file data structures.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -30,7 +30,9 @@ with Prj.Tree; use Prj.Tree; ...@@ -30,7 +30,9 @@ with Prj.Tree; use Prj.Tree;
private package Prj.Strt is private package Prj.Strt is
procedure Parse_String_Type_List (First_String : out Project_Node_Id); procedure Parse_String_Type_List
(In_Tree : Project_Node_Tree_Ref;
First_String : out Project_Node_Id);
-- Get the list of literal strings that are allowed for a typed string. -- Get the list of literal strings that are allowed for a typed string.
-- On entry, the current token is the first literal string following -- On entry, the current token is the first literal string following
-- a left parenthesis in a string type declaration such as: -- a left parenthesis in a string type declaration such as:
...@@ -45,7 +47,9 @@ private package Prj.Strt is ...@@ -45,7 +47,9 @@ private package Prj.Strt is
-- or after a comma -- or after a comma
-- - two literal strings in the list are equal -- - two literal strings in the list are equal
procedure Start_New_Case_Construction (String_Type : Project_Node_Id); procedure Start_New_Case_Construction
(In_Tree : Project_Node_Tree_Ref;
String_Type : Project_Node_Id);
-- This procedure is called at the beginning of a case construction -- This procedure is called at the beginning of a case construction
-- The parameter String_Type is the node for the string type -- The parameter String_Type is the node for the string type
-- of the case label variable. -- of the case label variable.
...@@ -65,7 +69,8 @@ private package Prj.Strt is ...@@ -65,7 +69,8 @@ private package Prj.Strt is
-- not been specified. -- not been specified.
procedure Parse_Choice_List procedure Parse_Choice_List
(First_Choice : out Project_Node_Id); (In_Tree : Project_Node_Tree_Ref;
First_Choice : out Project_Node_Id);
-- Get the label for a choice list. -- Get the label for a choice list.
-- Report an error if -- Report an error if
-- - a case label is not a literal string -- - a case label is not a literal string
...@@ -73,7 +78,8 @@ private package Prj.Strt is ...@@ -73,7 +78,8 @@ private package Prj.Strt is
-- - the same case label is repeated in the same case construction -- - the same case label is repeated in the same case construction
procedure Parse_Expression procedure Parse_Expression
(Expression : out Project_Node_Id; (In_Tree : Project_Node_Tree_Ref;
Expression : out Project_Node_Id;
Current_Project : Project_Node_Id; Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id; Current_Package : Project_Node_Id;
Optional_Index : Boolean); Optional_Index : Boolean);
...@@ -85,7 +91,8 @@ private package Prj.Strt is ...@@ -85,7 +91,8 @@ private package Prj.Strt is
-- been parsed. -- been parsed.
procedure Parse_Variable_Reference procedure Parse_Variable_Reference
(Variable : out Project_Node_Id; (In_Tree : Project_Node_Tree_Ref;
Variable : out Project_Node_Id;
Current_Project : Project_Node_Id; Current_Project : Project_Node_Id;
Current_Package : Project_Node_Id); Current_Package : Project_Node_Id);
-- Parse a variable or attribute reference. -- Parse a variable or attribute reference.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -75,6 +75,7 @@ package body Prj.Util is ...@@ -75,6 +75,7 @@ package body Prj.Util is
function Executable_Of function Executable_Of
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Main : Name_Id; Main : Name_Id;
Index : Int; Index : Int;
Ada_Main : Boolean := True) return Name_Id Ada_Main : Boolean := True) return Name_Id
...@@ -82,19 +83,21 @@ package body Prj.Util is ...@@ -82,19 +83,21 @@ package body Prj.Util is
pragma Assert (Project /= No_Project); pragma Assert (Project /= No_Project);
The_Packages : constant Package_Id := The_Packages : constant Package_Id :=
Projects.Table (Project).Decl.Packages; In_Tree.Projects.Table (Project).Decl.Packages;
Builder_Package : constant Prj.Package_Id := Builder_Package : constant Prj.Package_Id :=
Prj.Util.Value_Of Prj.Util.Value_Of
(Name => Name_Builder, (Name => Name_Builder,
In_Packages => The_Packages); In_Packages => The_Packages,
In_Tree => In_Tree);
Executable : Variable_Value := Executable : Variable_Value :=
Prj.Util.Value_Of Prj.Util.Value_Of
(Name => Main, (Name => Main,
Index => Index, Index => Index,
Attribute_Or_Array_Name => Name_Executable, Attribute_Or_Array_Name => Name_Executable,
In_Package => Builder_Package); In_Package => Builder_Package,
In_Tree => In_Tree);
Executable_Suffix : constant Variable_Value := Executable_Suffix : constant Variable_Value :=
Prj.Util.Value_Of Prj.Util.Value_Of
...@@ -102,15 +105,16 @@ package body Prj.Util is ...@@ -102,15 +105,16 @@ package body Prj.Util is
Index => 0, Index => 0,
Attribute_Or_Array_Name => Attribute_Or_Array_Name =>
Name_Executable_Suffix, Name_Executable_Suffix,
In_Package => Builder_Package); In_Package => Builder_Package,
In_Tree => In_Tree);
Body_Append : constant String := Get_Name_String Body_Append : constant String := Get_Name_String
(Projects.Table (In_Tree.Projects.Table
(Project). (Project).
Naming.Ada_Body_Suffix); Naming.Ada_Body_Suffix);
Spec_Append : constant String := Get_Name_String Spec_Append : constant String := Get_Name_String
(Projects.Table (In_Tree.Projects.Table
(Project). (Project).
Naming.Ada_Spec_Suffix); Naming.Ada_Spec_Suffix);
...@@ -128,7 +132,7 @@ package body Prj.Util is ...@@ -128,7 +132,7 @@ package body Prj.Util is
Last : Positive := Name_Len; Last : Positive := Name_Len;
Naming : constant Naming_Data := Naming : constant Naming_Data :=
Projects.Table (Project).Naming; In_Tree.Projects.Table (Project).Naming;
Spec_Suffix : constant String := Spec_Suffix : constant String :=
Get_Name_String (Naming.Ada_Spec_Suffix); Get_Name_String (Naming.Ada_Spec_Suffix);
...@@ -163,7 +167,8 @@ package body Prj.Util is ...@@ -163,7 +167,8 @@ package body Prj.Util is
(Name => Name_Find, (Name => Name_Find,
Index => 0, Index => 0,
Attribute_Or_Array_Name => Name_Executable, Attribute_Or_Array_Name => Name_Executable,
In_Package => Builder_Package); In_Package => Builder_Package,
In_Tree => In_Tree);
end if; end if;
end; end;
end if; end if;
...@@ -400,7 +405,8 @@ package body Prj.Util is ...@@ -400,7 +405,8 @@ package body Prj.Util is
function Value_Of function Value_Of
(Index : Name_Id; (Index : Name_Id;
In_Array : Array_Element_Id) return Name_Id In_Array : Array_Element_Id;
In_Tree : Project_Tree_Ref) return Name_Id
is is
Current : Array_Element_Id := In_Array; Current : Array_Element_Id := In_Array;
Element : Array_Element; Element : Array_Element;
...@@ -411,7 +417,7 @@ package body Prj.Util is ...@@ -411,7 +417,7 @@ package body Prj.Util is
return No_Name; return No_Name;
end if; end if;
Element := Array_Elements.Table (Current); Element := In_Tree.Array_Elements.Table (Current);
if not Element.Index_Case_Sensitive then if not Element.Index_Case_Sensitive then
Get_Name_String (Index); Get_Name_String (Index);
...@@ -420,7 +426,7 @@ package body Prj.Util is ...@@ -420,7 +426,7 @@ package body Prj.Util is
end if; end if;
while Current /= No_Array_Element loop while Current /= No_Array_Element loop
Element := Array_Elements.Table (Current); Element := In_Tree.Array_Elements.Table (Current);
if Real_Index = Element.Index then if Real_Index = Element.Index then
exit when Element.Value.Kind /= Single; exit when Element.Value.Kind /= Single;
...@@ -437,7 +443,8 @@ package body Prj.Util is ...@@ -437,7 +443,8 @@ package body Prj.Util is
function Value_Of function Value_Of
(Index : Name_Id; (Index : Name_Id;
Src_Index : Int := 0; Src_Index : Int := 0;
In_Array : Array_Element_Id) return Variable_Value In_Array : Array_Element_Id;
In_Tree : Project_Tree_Ref) return Variable_Value
is is
Current : Array_Element_Id := In_Array; Current : Array_Element_Id := In_Array;
Element : Array_Element; Element : Array_Element;
...@@ -448,7 +455,7 @@ package body Prj.Util is ...@@ -448,7 +455,7 @@ package body Prj.Util is
return Nil_Variable_Value; return Nil_Variable_Value;
end if; end if;
Element := Array_Elements.Table (Current); Element := In_Tree.Array_Elements.Table (Current);
if not Element.Index_Case_Sensitive then if not Element.Index_Case_Sensitive then
Get_Name_String (Index); Get_Name_String (Index);
...@@ -457,7 +464,7 @@ package body Prj.Util is ...@@ -457,7 +464,7 @@ package body Prj.Util is
end if; end if;
while Current /= No_Array_Element loop while Current /= No_Array_Element loop
Element := Array_Elements.Table (Current); Element := In_Tree.Array_Elements.Table (Current);
if Real_Index = Element.Index and then if Real_Index = Element.Index and then
Src_Index = Element.Src_Index Src_Index = Element.Src_Index
...@@ -475,7 +482,8 @@ package body Prj.Util is ...@@ -475,7 +482,8 @@ package body Prj.Util is
(Name : Name_Id; (Name : Name_Id;
Index : Int := 0; Index : Int := 0;
Attribute_Or_Array_Name : Name_Id; Attribute_Or_Array_Name : Name_Id;
In_Package : Package_Id) return Variable_Value In_Package : Package_Id;
In_Tree : Project_Tree_Ref) return Variable_Value
is is
The_Array : Array_Element_Id; The_Array : Array_Element_Id;
The_Attribute : Variable_Value := Nil_Variable_Value; The_Attribute : Variable_Value := Nil_Variable_Value;
...@@ -488,12 +496,14 @@ package body Prj.Util is ...@@ -488,12 +496,14 @@ package body Prj.Util is
The_Array := The_Array :=
Value_Of Value_Of
(Name => Attribute_Or_Array_Name, (Name => Attribute_Or_Array_Name,
In_Arrays => Packages.Table (In_Package).Decl.Arrays); In_Arrays => In_Tree.Packages.Table (In_Package).Decl.Arrays,
In_Tree => In_Tree);
The_Attribute := The_Attribute :=
Value_Of Value_Of
(Index => Name, (Index => Name,
Src_Index => Index, Src_Index => Index,
In_Array => The_Array); In_Array => The_Array,
In_Tree => In_Tree);
-- If there is no array element, look for a variable -- If there is no array element, look for a variable
...@@ -501,7 +511,9 @@ package body Prj.Util is ...@@ -501,7 +511,9 @@ package body Prj.Util is
The_Attribute := The_Attribute :=
Value_Of Value_Of
(Variable_Name => Attribute_Or_Array_Name, (Variable_Name => Attribute_Or_Array_Name,
In_Variables => Packages.Table (In_Package).Decl.Attributes); In_Variables => In_Tree.Packages.Table
(In_Package).Decl.Attributes,
In_Tree => In_Tree);
end if; end if;
end if; end if;
...@@ -511,16 +523,18 @@ package body Prj.Util is ...@@ -511,16 +523,18 @@ package body Prj.Util is
function Value_Of function Value_Of
(Index : Name_Id; (Index : Name_Id;
In_Array : Name_Id; In_Array : Name_Id;
In_Arrays : Array_Id) return Name_Id In_Arrays : Array_Id;
In_Tree : Project_Tree_Ref) return Name_Id
is is
Current : Array_Id := In_Arrays; Current : Array_Id := In_Arrays;
The_Array : Array_Data; The_Array : Array_Data;
begin begin
while Current /= No_Array loop while Current /= No_Array loop
The_Array := Arrays.Table (Current); The_Array := In_Tree.Arrays.Table (Current);
if The_Array.Name = In_Array then if The_Array.Name = In_Array then
return Value_Of (Index, In_Array => The_Array.Value); return Value_Of
(Index, In_Array => The_Array.Value, In_Tree => In_Tree);
else else
Current := The_Array.Next; Current := The_Array.Next;
end if; end if;
...@@ -531,14 +545,15 @@ package body Prj.Util is ...@@ -531,14 +545,15 @@ package body Prj.Util is
function Value_Of function Value_Of
(Name : Name_Id; (Name : Name_Id;
In_Arrays : Array_Id) return Array_Element_Id In_Arrays : Array_Id;
In_Tree : Project_Tree_Ref) return Array_Element_Id
is is
Current : Array_Id := In_Arrays; Current : Array_Id := In_Arrays;
The_Array : Array_Data; The_Array : Array_Data;
begin begin
while Current /= No_Array loop while Current /= No_Array loop
The_Array := Arrays.Table (Current); The_Array := In_Tree.Arrays.Table (Current);
if The_Array.Name = Name then if The_Array.Name = Name then
return The_Array.Value; return The_Array.Value;
...@@ -552,14 +567,15 @@ package body Prj.Util is ...@@ -552,14 +567,15 @@ package body Prj.Util is
function Value_Of function Value_Of
(Name : Name_Id; (Name : Name_Id;
In_Packages : Package_Id) return Package_Id In_Packages : Package_Id;
In_Tree : Project_Tree_Ref) return Package_Id
is is
Current : Package_Id := In_Packages; Current : Package_Id := In_Packages;
The_Package : Package_Element; The_Package : Package_Element;
begin begin
while Current /= No_Package loop while Current /= No_Package loop
The_Package := Packages.Table (Current); The_Package := In_Tree.Packages.Table (Current);
exit when The_Package.Name /= No_Name exit when The_Package.Name /= No_Name
and then The_Package.Name = Name; and then The_Package.Name = Name;
Current := The_Package.Next; Current := The_Package.Next;
...@@ -570,14 +586,16 @@ package body Prj.Util is ...@@ -570,14 +586,16 @@ package body Prj.Util is
function Value_Of function Value_Of
(Variable_Name : Name_Id; (Variable_Name : Name_Id;
In_Variables : Variable_Id) return Variable_Value In_Variables : Variable_Id;
In_Tree : Project_Tree_Ref) return Variable_Value
is is
Current : Variable_Id := In_Variables; Current : Variable_Id := In_Variables;
The_Variable : Variable; The_Variable : Variable;
begin begin
while Current /= No_Variable loop while Current /= No_Variable loop
The_Variable := Variable_Elements.Table (Current); The_Variable :=
In_Tree.Variable_Elements.Table (Current);
if Variable_Name = The_Variable.Name then if Variable_Name = The_Variable.Name then
return The_Variable.Value; return The_Variable.Value;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- -- Copyright (C) 2001-2005 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- --
...@@ -34,6 +34,7 @@ package Prj.Util is ...@@ -34,6 +34,7 @@ package Prj.Util is
function Executable_Of function Executable_Of
(Project : Project_Id; (Project : Project_Id;
In_Tree : Project_Tree_Ref;
Main : Name_Id; Main : Name_Id;
Index : Int; Index : Int;
Ada_Main : Boolean := True) return Name_Id; Ada_Main : Boolean := True) return Name_Id;
...@@ -51,7 +52,8 @@ package Prj.Util is ...@@ -51,7 +52,8 @@ package Prj.Util is
function Value_Of function Value_Of
(Index : Name_Id; (Index : Name_Id;
In_Array : Array_Element_Id) return Name_Id; In_Array : Array_Element_Id;
In_Tree : Project_Tree_Ref) return Name_Id;
-- Get a single string array component. Returns No_Name if there is no -- Get a single string array component. Returns No_Name if there is no
-- component Index, if In_Array is null, or if the component is a String -- component Index, if In_Array is null, or if the component is a String
-- list. Depending on the attribute (only attributes may be associative -- list. Depending on the attribute (only attributes may be associative
...@@ -62,7 +64,8 @@ package Prj.Util is ...@@ -62,7 +64,8 @@ package Prj.Util is
function Value_Of function Value_Of
(Index : Name_Id; (Index : Name_Id;
Src_Index : Int := 0; Src_Index : Int := 0;
In_Array : Array_Element_Id) return Variable_Value; In_Array : Array_Element_Id;
In_Tree : Project_Tree_Ref) return Variable_Value;
-- Get a string array component (single String or String list). -- Get a string array component (single String or String list).
-- Returns Nil_Variable_Value if there is no component Index -- Returns Nil_Variable_Value if there is no component Index
-- or if In_Array is null. -- or if In_Array is null.
...@@ -76,7 +79,8 @@ package Prj.Util is ...@@ -76,7 +79,8 @@ package Prj.Util is
(Name : Name_Id; (Name : Name_Id;
Index : Int := 0; Index : Int := 0;
Attribute_Or_Array_Name : Name_Id; Attribute_Or_Array_Name : Name_Id;
In_Package : Package_Id) return Variable_Value; In_Package : Package_Id;
In_Tree : Project_Tree_Ref) return Variable_Value;
-- In a specific package, -- In a specific package,
-- - if there exists an array Attribute_Or_Array_Name with an index -- - if there exists an array Attribute_Or_Array_Name with an index
-- Name, returns the corresponding component (depending on the -- Name, returns the corresponding component (depending on the
...@@ -90,28 +94,32 @@ package Prj.Util is ...@@ -90,28 +94,32 @@ package Prj.Util is
function Value_Of function Value_Of
(Index : Name_Id; (Index : Name_Id;
In_Array : Name_Id; In_Array : Name_Id;
In_Arrays : Array_Id) return Name_Id; In_Arrays : Array_Id;
In_Tree : Project_Tree_Ref) return Name_Id;
-- Get a string array component in an array of an array list. -- Get a string array component in an array of an array list.
-- Returns No_Name if there is no component Index, if In_Arrays is null, if -- Returns No_Name if there is no component Index, if In_Arrays is null, if
-- In_Array is not found in In_Arrays or if the component is a String list. -- In_Array is not found in In_Arrays or if the component is a String list.
function Value_Of function Value_Of
(Name : Name_Id; (Name : Name_Id;
In_Arrays : Array_Id) return Array_Element_Id; In_Arrays : Array_Id;
In_Tree : Project_Tree_Ref) return Array_Element_Id;
-- Returns a specified array in an array list. Returns No_Array_Element -- Returns a specified array in an array list. Returns No_Array_Element
-- if In_Arrays is null or if Name is not the name of an array in -- if In_Arrays is null or if Name is not the name of an array in
-- In_Arrays. The caller must ensure that Name is in lower case. -- In_Arrays. The caller must ensure that Name is in lower case.
function Value_Of function Value_Of
(Name : Name_Id; (Name : Name_Id;
In_Packages : Package_Id) return Package_Id; In_Packages : Package_Id;
In_Tree : Project_Tree_Ref) return Package_Id;
-- Returns a specified package in a package list. Returns No_Package -- Returns a specified package in a package list. Returns No_Package
-- if In_Packages is null or if Name is not the name of a package in -- if In_Packages is null or if Name is not the name of a package in
-- Package_List. The caller must ensure that Name is in lower case. -- Package_List. The caller must ensure that Name is in lower case.
function Value_Of function Value_Of
(Variable_Name : Name_Id; (Variable_Name : Name_Id;
In_Variables : Variable_Id) return Variable_Value; In_Variables : Variable_Id;
In_Tree : Project_Tree_Ref) return Variable_Value;
-- Returns a specified variable in a variable list. Returns null if -- Returns a specified variable in a variable list. Returns null if
-- In_Variables is null or if Variable_Name is not the name of a -- In_Variables is null or if Variable_Name is not the name of a
-- variable in In_Variables. Caller must ensure that Name is lower case. -- variable in In_Variables. Caller must ensure that Name is lower case.
......
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