OSDN Git Service

2010-10-05 Ed Schonberg <schonberg@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / prj-tree.ads
index d3b86e6..5ed88d5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2001-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-2010, 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- --
@@ -31,6 +31,7 @@ with GNAT.Dynamic_Tables;
 with Table;
 
 with Prj.Attr; use Prj.Attr;
+with Prj.Env;
 
 package Prj.Tree is
 
@@ -614,9 +615,9 @@ package Prj.Tree is
      (Tree       : Project_Node_Tree_Ref;
       Prj_Or_Pkg : Project_Node_Id;
       Name       : Name_Id;
-      Index_Name : Name_Id       := No_Name;
-      Kind       : Variable_Kind := List;
-      At_Index   : Integer       := 0;
+      Index_Name : Name_Id         := No_Name;
+      Kind       : Variable_Kind   := List;
+      At_Index   : Integer         := 0;
       Value      : Project_Node_Id := Empty_Node) return Project_Node_Id;
    --  Create a new attribute. The new declaration is added at the end of the
    --  declarative item list for Prj_Or_Pkg (a project or a package), but
@@ -624,14 +625,15 @@ package Prj.Tree is
    --  Empty_Node. If Index_Name is not "", then if creates an attribute value
    --  for a specific index. At_Index is used for the " at <idx>" in the naming
    --  exceptions.
-   --  To set the value of the attribute, either provide a value for
-   --  Value, or use Set_Expression_Of to set the value of the attribute
-   --  (in which case Enclose_In_Expression might be useful). The former is
-   --  recommended since it will more correctly handle cases where the index
-   --  needs to be set on the expression rather than on the index of the
-   --  attribute ('for Specification ("unit") use "file" at 3', versus
-   --  'for Executable ("file" at 3) use "name"'). Value must be a
-   --  N_String_Literal if an index will be added to it
+   --
+   --  To set the value of the attribute, either provide a value for Value, or
+   --  use Set_Expression_Of to set the value of the attribute (in which case
+   --  Enclose_In_Expression might be useful). The former is recommended since
+   --  it will more correctly handle cases where the index needs to be set on
+   --  the expression rather than on the index of the attribute (i.e. 'for
+   --  Specification ("unit") use "file" at 3', versus 'for Executable ("file"
+   --  at 3) use "name"'). Value must be a N_String_Literal if an index will be
+   --  added to it.
 
    function Create_Literal_String
      (Str  : Namet.Name_Id;
@@ -657,7 +659,7 @@ package Prj.Tree is
      (Node : Project_Node_Id;
       Tree : Project_Node_Tree_Ref) return Project_Node_Id;
    --  Enclose the Node inside a N_Expression node, and return this expression.
-   --  This does nothing if Node is already a N_Expression
+   --  This does nothing if Node is already a N_Expression.
 
    --------------------
    -- Set Procedures --
@@ -1469,12 +1471,11 @@ package Prj.Tree is
       --  project-tree specific so that one can load the same tree twice but
       --  have two views of it, for instance.
 
-      Project_Path : String_Access;
-      --  The project path, manipulated through subprograms in prj-ext.ads.
-      --  As a special case, if the first character is '#:" or this variable is
-      --  unset, this means that the PATH has not been fully initialized yet
-      --  (although subprograms prj-ext.ads will properly take care of that).
-      --
+      Target_Name : String_Access := null;
+      --  The target name, if any, specified with the gprbuild or gprclean
+      --  switch --target=.
+
+      Project_Path : aliased Prj.Env.Project_Search_Path;
       --  The project path is tree specific, since we might want to load
       --  simultaneously multiple projects, each with its own search path, in
       --  particular when using different compilers with different default