diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 15:46:57 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 15:46:57 +0000 |
commit | d1a942e47088eb7fd10091a7aeb366d852e7d406 (patch) | |
tree | cf1142dd403f99e75300ca6822d5c4d182a98b74 /gcc/ada/prj-env.ads | |
parent | 6938bdf83f5ac8a41e29d9416c447095002970d1 (diff) | |
download | gcc-d1a942e47088eb7fd10091a7aeb366d852e7d406.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96481 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-env.ads')
-rw-r--r-- | gcc/ada/prj-env.ads | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/gcc/ada/prj-env.ads b/gcc/ada/prj-env.ads index 32dd37674a8..905e8d0d1ca 100644 --- a/gcc/ada/prj-env.ads +++ b/gcc/ada/prj-env.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- 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; package Prj.Env is procedure Initialize; - -- Called by Prj.Initialize to perform required initialization - -- steps for this package. + -- Called by Prj.Initialize to perform required initialization steps for + -- this package. - procedure Print_Sources; + procedure Print_Sources (In_Tree : Project_Tree_Ref); -- Output the list of sources, after Project files have been scanned procedure Create_Mapping_File (Project : Project_Id; + In_Tree : Project_Tree_Ref; Name : out Name_Id); -- Create a temporary mapping file for project Project. For each unit -- in the closure of immediate sources of Project, put the mapping of @@ -52,6 +53,7 @@ package Prj.Env is procedure Create_Config_Pragmas_File (For_Project : Project_Id; Main_Project : Project_Id; + In_Tree : Project_Tree_Ref; Include_Config_Files : Boolean := True); -- If there needs to have SFN pragmas, either for non standard naming -- schemes or for individual units, or (when Include_Config_Files is True) @@ -61,12 +63,15 @@ package Prj.Env is -- a temporary file that contains all configuration pragmas, and specify -- 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 -- it and cache it. function Ada_Include_Path (Project : Project_Id; + In_Tree : Project_Tree_Ref; Recursive : Boolean) return String; -- Get the ADA_INCLUDE_PATH of a Project file. If Recursive it True, -- get all the source directories of the imported and modified project @@ -76,6 +81,7 @@ package Prj.Env is function Ada_Objects_Path (Project : Project_Id; + In_Tree : Project_Tree_Ref; Including_Libraries : Boolean := True) return String_Access; -- 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 @@ -83,22 +89,25 @@ package Prj.Env is procedure Set_Ada_Paths (Project : Project_Id; + In_Tree : Project_Tree_Ref; Including_Libraries : Boolean); -- Set the env vars for additional project path files, after -- 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 -- calls to Set_Ada_Paths. function Path_Name_Of_Library_Unit_Body (Name : String; - Project : Project_Id) return String; + Project : Project_Id; + In_Tree : Project_Tree_Ref) return String; -- Returns the Path of a library unit function File_Name_Of_Library_Unit_Body (Name : String; Project : Project_Id; + In_Tree : Project_Tree_Ref; Main_Project_Only : Boolean := True; Full_Path : Boolean := False) return String; -- Returns the file name of a library unit, in canonical case. Name may or @@ -117,7 +126,8 @@ package Prj.Env is function Project_Of (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 -- (".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 @@ -125,20 +135,25 @@ package Prj.Env is procedure Get_Reference (Source_File_Name : String; + In_Tree : Project_Tree_Ref; Project : out Project_Id; Path : out Name_Id); -- Returns the project of a source and its path in displayable form generic with procedure Action (Path : String); - procedure For_All_Source_Dirs (Project : Project_Id); - -- Iterate through all the source directories of a project, - -- including those of imported or modified projects. + procedure For_All_Source_Dirs + (Project : Project_Id; + In_Tree : Project_Tree_Ref); + -- Iterate through all the source directories of a project, including + -- those of imported or modified projects. generic with procedure Action (Path : String); - procedure For_All_Object_Dirs (Project : Project_Id); - -- Iterate through all the object directories of a project, - -- including those of imported or modified projects. + procedure For_All_Object_Dirs + (Project : Project_Id; + In_Tree : Project_Tree_Ref); + -- Iterate through all the object directories of a project, including + -- those of imported or modified projects. end Prj.Env; |