summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-tree.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:48:54 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:48:54 +0000
commitf17fd3d988f031a40da04751224ecfe8d2f276fc (patch)
tree19a9ced7ffaa892a7a6277565007023c9130ccce /gcc/ada/prj-tree.adb
parent3dbdaa3852cab88ddf3ecafd330ad77e67de3c6d (diff)
downloadgcc-f17fd3d988f031a40da04751224ecfe8d2f276fc.tar.gz
2008-04-08 Vincent Celier <celier@adacore.com>
* clean.adb (Parse_Cmd_Line): Recognize switch --subdirs= (Usage): Add line for switch --subdirs= Add new switch -eL, to follow symbolic links when processing project files. * gnatcmd.adb: Process switches -eL and --subdirs= (Non_VMS_Usage): Output "gnaampcmd" instead of "gnat", and call Program_Name to get proper tool names when AAMP_On_Target is set. (Gnatcmd): Call Add_Default_Search_Dirs and Get_Target_Parameters to get AAMP_On_Target set properly for use of GNAAMP tools (this is needed by Osint.Program_Name). * gnatname.adb: (Scan_Args): Recognize switches -eL and --subdirs= (Usage): Add lines for switches -eL and --subdirs= * makeusg.adb: Add line for switch --subdirs= * prj.ads: (Source_Data): New Boolean component Compiled, defaulted to True (Empty_File_Name: New global variable in private part, initialized in procedure Initialize. (Subdirs_Option): New constant string (Subdirs): New String_Ptr global variable (Language_Config): New component Include_Compatible_Languages (Project_Qualifier): New type for project qualifiers (Project_Data): New component Qualifier (Project_Configuration): New component Archive_Builder_Append_Option * prj-nmsc.adb (Get_Unit_Exceptions): When a unit is already in another imported project indicate the name of this imported project. (Check_File): When a unit is in two project files, indicate the project names and the paths of the source files for each project. (Add_Source): Set Compiled to False if compiler driver is empty. Only set object, dependency and switches file names if Compiled is True. (Process_Compiler): Allow the empty string for value of attribute Driver (Get_Directories): When Subdirs is not null and Object_Dir is not specified, locate and create if necessary the actual object dir. (Locate_Directory): When Subdirs is not empty and Create is not the empty string, locate and create if necessary the actual directory as a subdirectory of directory Name. (Check_Library_Attributes.Check_Library): Allow a project where the only "sources" are header files of file based languages to be imported by library projects, in multi-language mode (gprbuild). (Check_Library_Attributes.Check_Library): In multi-language mode (gprbuild), allow a library project to import a project with no sources, even when this is not declared explicitly. (Check_If_Externally_Built): A virtual project extending an externally built project is also externally built. (Check_Library_Attributes): For a virtual project extending a library project, inherit the library directory. (Process_Project_Level_Array_Attributes): Process new attribute Inherit_Source_Path. For projects with specified qualifiers "standard", "library" or "abstract", check that the project conforms to the qualifier. (Process_Project_Level_Simple_Attributes): Process new attribute Archive_Builder_Append_Option. * switch-m.adb: (Scan_Make_Switches): Process switch --subdirs= (Normalize_Compiler_Switches): Only keep compiler switches that are passed to gnat1 by the gcc driver and that are stored in the ALI file by gnat1. Do not take into account switc -save-temps * makegpr.adb (Compile_Link_With_Gnatmake): Transmit switch -eL if gprmake is called with -eL. (Scan_Arg): Recognize switch -eL (Usage): Add line for switch -eL * prj.adb (Initialize): Initialize Empty_File_Name (Project_Empty): New component Qualifier * prj-attr.ads, prj-attr.adb: New project level attribute Inherit_Source_Path. New project level attribute Archive_Builder_Append_Option * prj-dect.adb: Replace System.Strings by GNAT.Strings. * prj-ext.adb (Initialize_Project_Path): In Multi_Language mode, add <prefix>/lib/gnat in the project path, after <prefix>/share/gpr, for upward compatibility. * prj-part.adb (Project_Path_Name_Of.Try_Path): In high verbosity, put each Trying ..." on different lines. (Parse_Single_Project): Recognize project qualifiers. Fail in qualifier is "configuration" when not in configuration. Fail when in configuration when a specified qualifier is other than "configuration". * prj-proc.adb (Process_Declarative_Items): Link new elements of copied full associative array together. (Recursive_Process): Put the project qualifier in the project data * prj-tree.ads, prj-tree.adb: (Project_Qualifier_Of): New function (Set_Project_Qualifier_Of): New procedure git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134023 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-tree.adb')
-rw-r--r--gcc/ada/prj-tree.adb38
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/ada/prj-tree.adb b/gcc/ada/prj-tree.adb
index db32e4a0a07..83ee5f936b6 100644
--- a/gcc/ada/prj-tree.adb
+++ b/gcc/ada/prj-tree.adb
@@ -108,6 +108,7 @@ package body Prj.Tree is
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment_Zones,
+ Qualifier => Unspecified,
Expr_Kind => Undefined,
Location => No_Location,
Directory => No_Path,
@@ -153,6 +154,7 @@ package body Prj.Tree is
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment,
+ Qualifier => Unspecified,
Expr_Kind => Undefined,
Flag1 => Comments.Table (J).Follows_Empty_Line,
Flag2 =>
@@ -321,6 +323,7 @@ package body Prj.Tree is
Zone := Project_Node_Table.Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table (Zone) :=
(Kind => N_Comment_Zones,
+ Qualifier => Unspecified,
Location => No_Location,
Directory => No_Path,
Expr_Kind => Undefined,
@@ -395,6 +398,7 @@ package body Prj.Tree is
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => Of_Kind,
+ Qualifier => Unspecified,
Location => No_Location,
Directory => No_Path,
Expr_Kind => And_Expr_Kind,
@@ -429,6 +433,7 @@ package body Prj.Tree is
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment_Zones,
+ Qualifier => Unspecified,
Expr_Kind => Undefined,
Location => No_Location,
Directory => No_Path,
@@ -458,6 +463,7 @@ package body Prj.Tree is
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment,
+ Qualifier => Unspecified,
Expr_Kind => Undefined,
Flag1 => Comments.Table (J).Follows_Empty_Line,
Flag2 =>
@@ -1352,6 +1358,22 @@ package body Prj.Tree is
return In_Tree.Project_Nodes.Table (Node).Field2;
end Project_Declaration_Of;
+ --------------------------
+ -- Project_Qualifier_Of --
+ --------------------------
+
+ function Project_Qualifier_Of
+ (Node : Project_Node_Id;
+ In_Tree : Project_Node_Tree_Ref) return Project_Qualifier
+ is
+ begin
+ pragma Assert
+ (Node /= Empty_Node
+ and then
+ In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
+ return In_Tree.Project_Nodes.Table (Node).Qualifier;
+ end Project_Qualifier_Of;
+
-------------------------------------------
-- Project_File_Includes_Unkept_Comments --
-------------------------------------------
@@ -2467,6 +2489,22 @@ package body Prj.Tree is
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Project_Declaration_Of;
+ ------------------------------
+ -- Set_Project_Qualifier_Of --
+ ------------------------------
+
+ procedure Set_Project_Qualifier_Of
+ (Node : Project_Node_Id;
+ In_Tree : Project_Node_Tree_Ref;
+ To : Project_Qualifier)
+ is
+ begin
+ pragma Assert
+ (Node /= Empty_Node
+ and then In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
+ In_Tree.Project_Nodes.Table (Node).Qualifier := To;
+ end Set_Project_Qualifier_Of;
+
-----------------------------------------------
-- Set_Project_File_Includes_Unkept_Comments --
-----------------------------------------------