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-makr.adb | |
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-makr.adb')
-rw-r--r-- | gcc/ada/prj-makr.adb | 363 |
1 files changed, 211 insertions, 152 deletions
diff --git a/gcc/ada/prj-makr.adb b/gcc/ada/prj-makr.adb index 22f94aeae4c..d04ab20bd6f 100644 --- a/gcc/ada/prj-makr.adb +++ b/gcc/ada/prj-makr.adb @@ -117,6 +117,10 @@ package body Prj.Makr is Preproc_Switches : Argument_List; Very_Verbose : Boolean) is + Tree : constant Project_Node_Tree_Ref := new Project_Node_Tree_Data; + + + Path_Name : String (1 .. File_Path'Length + Project_File_Extension'Length); Path_Last : Natural := File_Path'Length; @@ -475,46 +479,57 @@ package body Prj.Makr is Decl_Item : constant Project_Node_Id := Default_Project_Node (Of_Kind => - N_Declarative_Item); + N_Declarative_Item, + In_Tree => Tree); Attribute : constant Project_Node_Id := Default_Project_Node (Of_Kind => - N_Attribute_Declaration); + N_Attribute_Declaration, + In_Tree => Tree); Expression : constant Project_Node_Id := Default_Project_Node (Of_Kind => N_Expression, - And_Expr_Kind => Single); + And_Expr_Kind => Single, + In_Tree => Tree); Term : constant Project_Node_Id := Default_Project_Node (Of_Kind => N_Term, - And_Expr_Kind => Single); + And_Expr_Kind => Single, + In_Tree => Tree); Value : constant Project_Node_Id := Default_Project_Node - (Of_Kind => N_Literal_String, - And_Expr_Kind => Single); + (Of_Kind => N_Literal_String, + And_Expr_Kind => Single, + In_Tree => Tree); begin Set_Next_Declarative_Item (Decl_Item, To => First_Declarative_Item_Of - (Naming_Package)); + (Naming_Package, Tree), + In_Tree => Tree); Set_First_Declarative_Item_Of - (Naming_Package, To => Decl_Item); + (Naming_Package, + To => Decl_Item, + In_Tree => Tree); Set_Current_Item_Node - (Decl_Item, To => Attribute); + (Decl_Item, + To => Attribute, + In_Tree => Tree); -- Is it a spec or a body? if SFN_Prag.Spec then Set_Name_Of - (Attribute, To => Name_Spec); + (Attribute, Tree, + To => Name_Spec); else Set_Name_Of - (Attribute, + (Attribute, Tree, To => Name_Body); end if; @@ -523,20 +538,21 @@ package body Prj.Makr is Get_Name_String (SFN_Prag.Unit); To_Lower (Name_Buffer (1 .. Name_Len)); Set_Associative_Array_Index_Of - (Attribute, To => Name_Find); + (Attribute, Tree, To => Name_Find); Set_Expression_Of - (Attribute, To => Expression); + (Attribute, Tree, To => Expression); Set_First_Term - (Expression, To => Term); - Set_Current_Term (Term, To => Value); + (Expression, Tree, To => Term); + Set_Current_Term + (Term, Tree, To => Value); -- And set the name of the file Set_String_Value_Of - (Value, To => File_Name_Id); + (Value, Tree, To => File_Name_Id); Set_Source_Index_Of - (Value, To => SFN_Prag.Index); + (Value, Tree, To => SFN_Prag.Index); end; end if; end loop; @@ -649,7 +665,8 @@ package body Prj.Makr is Csets.Initialize; Namet.Initialize; Snames.Initialize; - Prj.Initialize; + Prj.Initialize (No_Project_Tree); + Prj.Tree.Initialize (Tree); SFN_Pragmas.Set_Last (0); @@ -707,7 +724,8 @@ package body Prj.Makr is end if; Part.Parse - (Project => Project_Node, + (In_Tree => Tree, + Project => Project_Node, Project_File_Name => Output_Name (1 .. Output_Name_Last), Always_Errout_Finalize => False); @@ -725,27 +743,29 @@ package body Prj.Makr is declare With_Clause : Project_Node_Id := - First_With_Clause_Of (Project_Node); + First_With_Clause_Of (Project_Node, Tree); Previous : Project_Node_Id := Empty_Node; begin while With_Clause /= Empty_Node loop - if Tree.Name_Of (With_Clause) = Project_Naming_Id then + if Prj.Tree.Name_Of (With_Clause, Tree) = + Project_Naming_Id + then if Previous = Empty_Node then Set_First_With_Clause_Of - (Project_Node, - To => Next_With_Clause_Of (With_Clause)); + (Project_Node, Tree, + To => Next_With_Clause_Of (With_Clause, Tree)); else Set_Next_With_Clause_Of - (Previous, - To => Next_With_Clause_Of (With_Clause)); + (Previous, Tree, + To => Next_With_Clause_Of (With_Clause, Tree)); end if; exit; end if; Previous := With_Clause; - With_Clause := Next_With_Clause_Of (With_Clause); + With_Clause := Next_With_Clause_Of (With_Clause, Tree); end loop; end; @@ -757,41 +777,45 @@ package body Prj.Makr is Declaration : Project_Node_Id := First_Declarative_Item_Of (Project_Declaration_Of - (Project_Node)); + (Project_Node, Tree), + Tree); Previous : Project_Node_Id := Empty_Node; Current_Node : Project_Node_Id := Empty_Node; begin while Declaration /= Empty_Node loop - Current_Node := Current_Item_Node (Declaration); + Current_Node := Current_Item_Node (Declaration, Tree); - if (Kind_Of (Current_Node) = N_Attribute_Declaration + if (Kind_Of (Current_Node, Tree) = N_Attribute_Declaration and then - (Tree.Name_Of (Current_Node) = Name_Source_Files - or else Tree.Name_Of (Current_Node) = - Name_Source_List_File - or else Tree.Name_Of (Current_Node) = - Name_Source_Dirs)) + (Prj.Tree.Name_Of (Current_Node, Tree) = + Name_Source_Files + or else Prj.Tree.Name_Of (Current_Node, Tree) = + Name_Source_List_File + or else Prj.Tree.Name_Of (Current_Node, Tree) = + Name_Source_Dirs)) or else - (Kind_Of (Current_Node) = N_Package_Declaration - and then Tree.Name_Of (Current_Node) = Name_Naming) + (Kind_Of (Current_Node, Tree) = N_Package_Declaration + and then Prj.Tree.Name_Of (Current_Node, Tree) = + Name_Naming) then if Previous = Empty_Node then Set_First_Declarative_Item_Of - (Project_Declaration_Of (Project_Node), - To => Next_Declarative_Item (Declaration)); + (Project_Declaration_Of (Project_Node, Tree), + Tree, + To => Next_Declarative_Item (Declaration, Tree)); else Set_Next_Declarative_Item - (Previous, - To => Next_Declarative_Item (Declaration)); + (Previous, Tree, + To => Next_Declarative_Item (Declaration, Tree)); end if; else Previous := Declaration; end if; - Declaration := Next_Declarative_Item (Declaration); + Declaration := Next_Declarative_Item (Declaration, Tree); end loop; end; end if; @@ -971,11 +995,13 @@ package body Prj.Makr is -- name and its project declaration node. if Project_Node = Empty_Node then - Project_Node := Default_Project_Node (Of_Kind => N_Project); - Set_Name_Of (Project_Node, To => Output_Name_Id); + Project_Node := + Default_Project_Node (Of_Kind => N_Project, In_Tree => Tree); + Set_Name_Of (Project_Node, Tree, To => Output_Name_Id); Set_Project_Declaration_Of - (Project_Node, - To => Default_Project_Node (Of_Kind => N_Project_Declaration)); + (Project_Node, Tree, + To => Default_Project_Node + (Of_Kind => N_Project_Declaration, In_Tree => Tree)); end if; @@ -983,93 +1009,109 @@ package body Prj.Makr is -- for Source_Files as an empty list, to indicate there are no -- sources in the naming project. - Project_Naming_Node := Default_Project_Node (Of_Kind => N_Project); - Set_Name_Of (Project_Naming_Node, To => Project_Naming_Id); + Project_Naming_Node := + Default_Project_Node (Of_Kind => N_Project, In_Tree => Tree); + Set_Name_Of (Project_Naming_Node, Tree, To => Project_Naming_Id); Project_Naming_Decl := - Default_Project_Node (Of_Kind => N_Project_Declaration); - Set_Project_Declaration_Of (Project_Naming_Node, Project_Naming_Decl); + Default_Project_Node + (Of_Kind => N_Project_Declaration, In_Tree => Tree); + Set_Project_Declaration_Of + (Project_Naming_Node, Tree, Project_Naming_Decl); Naming_Package := - Default_Project_Node (Of_Kind => N_Package_Declaration); - Set_Name_Of (Naming_Package, To => Name_Naming); + Default_Project_Node + (Of_Kind => N_Package_Declaration, In_Tree => Tree); + Set_Name_Of (Naming_Package, Tree, To => Name_Naming); declare Decl_Item : constant Project_Node_Id := - Default_Project_Node (Of_Kind => N_Declarative_Item); + Default_Project_Node + (Of_Kind => N_Declarative_Item, In_Tree => Tree); Attribute : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Attribute_Declaration, - And_Expr_Kind => List); + Default_Project_Node + (Of_Kind => N_Attribute_Declaration, + In_Tree => Tree, + And_Expr_Kind => List); Expression : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Expression, - And_Expr_Kind => List); + Default_Project_Node + (Of_Kind => N_Expression, + In_Tree => Tree, + And_Expr_Kind => List); - Term : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Term, - And_Expr_Kind => List); + Term : constant Project_Node_Id := + Default_Project_Node + (Of_Kind => N_Term, + In_Tree => Tree, + And_Expr_Kind => List); Empty_List : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Literal_String_List); + Default_Project_Node + (Of_Kind => N_Literal_String_List, + In_Tree => Tree); begin Set_First_Declarative_Item_Of - (Project_Naming_Decl, To => Decl_Item); - Set_Next_Declarative_Item (Decl_Item, Naming_Package); - Set_Current_Item_Node (Decl_Item, To => Attribute); - Set_Name_Of (Attribute, To => Name_Source_Files); - Set_Expression_Of (Attribute, To => Expression); - Set_First_Term (Expression, To => Term); - Set_Current_Term (Term, To => Empty_List); + (Project_Naming_Decl, Tree, To => Decl_Item); + Set_Next_Declarative_Item (Decl_Item, Tree, Naming_Package); + Set_Current_Item_Node (Decl_Item, Tree, To => Attribute); + Set_Name_Of (Attribute, Tree, To => Name_Source_Files); + Set_Expression_Of (Attribute, Tree, To => Expression); + Set_First_Term (Expression, Tree, To => Term); + Set_Current_Term (Term, Tree, To => Empty_List); end; -- Add a with clause on the naming project in the main project declare With_Clause : constant Project_Node_Id := - Default_Project_Node (Of_Kind => N_With_Clause); + Default_Project_Node + (Of_Kind => N_With_Clause, In_Tree => Tree); begin Set_Next_With_Clause_Of - (With_Clause, To => First_With_Clause_Of (Project_Node)); - Set_First_With_Clause_Of (Project_Node, To => With_Clause); - Set_Name_Of (With_Clause, To => Project_Naming_Id); + (With_Clause, Tree, + To => First_With_Clause_Of (Project_Node, Tree)); + Set_First_With_Clause_Of (Project_Node, Tree, To => With_Clause); + Set_Name_Of (With_Clause, Tree, To => Project_Naming_Id); -- We set the project node to something different than -- Empty_Node, so that Prj.PP does not generate a limited -- with clause. - Set_Project_Node_Of (With_Clause, Non_Empty_Node); + Set_Project_Node_Of (With_Clause, Tree, Non_Empty_Node); Name_Len := Project_Naming_Last; Name_Buffer (1 .. Name_Len) := Project_Naming_File_Name (1 .. Project_Naming_Last); - Set_String_Value_Of (With_Clause, To => Name_Find); + Set_String_Value_Of (With_Clause, Tree, To => Name_Find); end; - Project_Declaration := Project_Declaration_Of (Project_Node); + Project_Declaration := Project_Declaration_Of (Project_Node, Tree); -- Add a renaming declaration for package Naming in the main project declare Decl_Item : constant Project_Node_Id := - Default_Project_Node (Of_Kind => N_Declarative_Item); + Default_Project_Node + (Of_Kind => N_Declarative_Item, + In_Tree => Tree); Naming : constant Project_Node_Id := - Default_Project_Node (Of_Kind => N_Package_Declaration); + Default_Project_Node + (Of_Kind => N_Package_Declaration, + In_Tree => Tree); + begin Set_Next_Declarative_Item - (Decl_Item, - To => First_Declarative_Item_Of (Project_Declaration)); + (Decl_Item, Tree, + To => First_Declarative_Item_Of (Project_Declaration, Tree)); Set_First_Declarative_Item_Of - (Project_Declaration, To => Decl_Item); - Set_Current_Item_Node (Decl_Item, To => Naming); - Set_Name_Of (Naming, To => Name_Naming); + (Project_Declaration, Tree, To => Decl_Item); + Set_Current_Item_Node (Decl_Item, Tree, To => Naming); + Set_Name_Of (Naming, Tree, To => Name_Naming); Set_Project_Of_Renamed_Package_Of - (Naming, To => Project_Naming_Node); + (Naming, Tree, To => Project_Naming_Node); end; -- Add an attribute declaration for Source_Dirs, initialized as an @@ -1078,36 +1120,43 @@ package body Prj.Makr is declare Decl_Item : constant Project_Node_Id := - Default_Project_Node (Of_Kind => N_Declarative_Item); + Default_Project_Node + (Of_Kind => N_Declarative_Item, + In_Tree => Tree); Attribute : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Attribute_Declaration, - And_Expr_Kind => List); + Default_Project_Node + (Of_Kind => N_Attribute_Declaration, + In_Tree => Tree, + And_Expr_Kind => List); Expression : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Expression, - And_Expr_Kind => List); + Default_Project_Node + (Of_Kind => N_Expression, + In_Tree => Tree, + And_Expr_Kind => List); Term : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Term, And_Expr_Kind => List); + Default_Project_Node + (Of_Kind => N_Term, In_Tree => Tree, + And_Expr_Kind => List); begin Set_Next_Declarative_Item - (Decl_Item, - To => First_Declarative_Item_Of (Project_Declaration)); + (Decl_Item, Tree, + To => First_Declarative_Item_Of (Project_Declaration, Tree)); Set_First_Declarative_Item_Of - (Project_Declaration, To => Decl_Item); - Set_Current_Item_Node (Decl_Item, To => Attribute); - Set_Name_Of (Attribute, To => Name_Source_Dirs); - Set_Expression_Of (Attribute, To => Expression); - Set_First_Term (Expression, To => Term); + (Project_Declaration, Tree, To => Decl_Item); + Set_Current_Item_Node (Decl_Item, Tree, To => Attribute); + Set_Name_Of (Attribute, Tree, To => Name_Source_Dirs); + Set_Expression_Of (Attribute, Tree, To => Expression); + Set_First_Term (Expression, Tree, To => Term); Source_Dirs_List := - Default_Project_Node (Of_Kind => N_Literal_String_List, - And_Expr_Kind => List); - Set_Current_Term (Term, To => Source_Dirs_List); + Default_Project_Node + (Of_Kind => N_Literal_String_List, + In_Tree => Tree, + And_Expr_Kind => List); + Set_Current_Term (Term, Tree, To => Source_Dirs_List); end; -- Add an attribute declaration for Source_List_File with the @@ -1115,43 +1164,49 @@ package body Prj.Makr is declare Decl_Item : constant Project_Node_Id := - Default_Project_Node (Of_Kind => N_Declarative_Item); + Default_Project_Node + (Of_Kind => N_Declarative_Item, + In_Tree => Tree); - Attribute : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Attribute_Declaration, - And_Expr_Kind => Single); + Attribute : constant Project_Node_Id := + Default_Project_Node + (Of_Kind => N_Attribute_Declaration, + In_Tree => Tree, + And_Expr_Kind => Single); Expression : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Expression, - And_Expr_Kind => Single); - - Term : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Term, - And_Expr_Kind => Single); - - Value : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Literal_String, - And_Expr_Kind => Single); + Default_Project_Node + (Of_Kind => N_Expression, + In_Tree => Tree, + And_Expr_Kind => Single); + + Term : constant Project_Node_Id := + Default_Project_Node + (Of_Kind => N_Term, + In_Tree => Tree, + And_Expr_Kind => Single); + + Value : constant Project_Node_Id := + Default_Project_Node + (Of_Kind => N_Literal_String, + In_Tree => Tree, + And_Expr_Kind => Single); begin Set_Next_Declarative_Item - (Decl_Item, - To => First_Declarative_Item_Of (Project_Declaration)); + (Decl_Item, Tree, + To => First_Declarative_Item_Of (Project_Declaration, Tree)); Set_First_Declarative_Item_Of - (Project_Declaration, To => Decl_Item); - Set_Current_Item_Node (Decl_Item, To => Attribute); - Set_Name_Of (Attribute, To => Name_Source_List_File); - Set_Expression_Of (Attribute, To => Expression); - Set_First_Term (Expression, To => Term); - Set_Current_Term (Term, To => Value); + (Project_Declaration, Tree, To => Decl_Item); + Set_Current_Item_Node (Decl_Item, Tree, To => Attribute); + Set_Name_Of (Attribute, Tree, To => Name_Source_List_File); + Set_Expression_Of (Attribute, Tree, To => Expression); + Set_First_Term (Expression, Tree, To => Term); + Set_Current_Term (Term, Tree, To => Value); Name_Len := Source_List_Last; Name_Buffer (1 .. Name_Len) := Source_List_Path (1 .. Source_List_Last); - Set_String_Value_Of (Value, To => Name_Find); + Set_String_Value_Of (Value, Tree, To => Name_Find); end; end if; @@ -1163,6 +1218,7 @@ package body Prj.Makr is Dir_Name : constant String := Directories (Index).all; Last : Natural := Dir_Name'Last; Recursively : Boolean := False; + begin if Dir_Name'Length >= 4 and then (Dir_Name (Last - 2 .. Last) = "/**") @@ -1177,35 +1233,38 @@ package body Prj.Makr is declare Expression : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Expression, - And_Expr_Kind => Single); - - Term : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Term, - And_Expr_Kind => Single); - - Value : constant Project_Node_Id := - Default_Project_Node - (Of_Kind => N_Literal_String, - And_Expr_Kind => Single); + Default_Project_Node + (Of_Kind => N_Expression, + In_Tree => Tree, + And_Expr_Kind => Single); + + Term : constant Project_Node_Id := + Default_Project_Node + (Of_Kind => N_Term, + In_Tree => Tree, + And_Expr_Kind => Single); + + Value : constant Project_Node_Id := + Default_Project_Node + (Of_Kind => N_Literal_String, + In_Tree => Tree, + And_Expr_Kind => Single); begin if Current_Source_Dir = Empty_Node then Set_First_Expression_In_List - (Source_Dirs_List, To => Expression); + (Source_Dirs_List, Tree, To => Expression); else Set_Next_Expression_In_List - (Current_Source_Dir, To => Expression); + (Current_Source_Dir, Tree, To => Expression); end if; Current_Source_Dir := Expression; - Set_First_Term (Expression, To => Term); - Set_Current_Term (Term, To => Value); + Set_First_Term (Expression, Tree, To => Term); + Set_Current_Term (Term, Tree, To => Value); Name_Len := Dir_Name'Length; Name_Buffer (1 .. Name_Len) := Dir_Name; - Set_String_Value_Of (Value, To => Name_Find); + Set_String_Value_Of (Value, Tree, To => Name_Find); end; end if; @@ -1252,7 +1311,7 @@ package body Prj.Makr is -- Output the project file Prj.PP.Pretty_Print - (Project_Node, + (Project_Node, Tree, W_Char => Write_A_Char'Access, W_Eol => Write_Eol'Access, W_Str => Write_A_String'Access, @@ -1290,7 +1349,7 @@ package body Prj.Makr is -- Output the naming project file Prj.PP.Pretty_Print - (Project_Naming_Node, + (Project_Naming_Node, Tree, W_Char => Write_A_Char'Access, W_Eol => Write_Eol'Access, W_Str => Write_A_String'Access, |