aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj-ext.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/prj-ext.ads')
-rw-r--r--gcc/ada/prj-ext.ads30
1 files changed, 25 insertions, 5 deletions
diff --git a/gcc/ada/prj-ext.ads b/gcc/ada/prj-ext.ads
index 931c3c5..cb9ecb7 100644
--- a/gcc/ada/prj-ext.ads
+++ b/gcc/ada/prj-ext.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2009, 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- --
@@ -26,8 +26,14 @@
-- Subprograms to set, get and cache external references, to be used as
-- External functions in project files.
+with Prj.Tree;
+
package Prj.Ext is
+ ------------------
+ -- Project Path --
+ ------------------
+
Gpr_Project_Path : constant String := "GPR_PROJECT_PATH";
-- Name of primary env. variable that contain path name(s) of directories
-- where project files may reside.
@@ -48,22 +54,36 @@ package Prj.Ext is
-- always start with the current directory (".") and the path separators
-- should be the correct ones for the platform.
+ -------------------------
+ -- External References --
+ -------------------------
+ -- External references influence the way a project tree is processed (in
+ -- particular they provide the values for the typed string variables that
+ -- are then used in case constructions).
+ -- External references are project-tree specific, so that when multiple
+ -- trees are loaded in parallel we can have different scenarios (or even
+ -- load the same tree twice and see different views of it).
+
procedure Add
- (External_Name : String;
+ (Tree : Prj.Tree.Project_Node_Tree_Ref;
+ External_Name : String;
Value : String);
-- Add an external reference (or modify an existing one)
function Value_Of
- (External_Name : Name_Id;
+ (Tree : Prj.Tree.Project_Node_Tree_Ref;
+ External_Name : Name_Id;
With_Default : Name_Id := No_Name)
return Name_Id;
-- Get the value of an external reference, and cache it for future uses
- function Check (Declaration : String) return Boolean;
+ function Check
+ (Tree : Prj.Tree.Project_Node_Tree_Ref;
+ Declaration : String) return Boolean;
-- Check that an external declaration <external>=<value> is correct.
-- If it is correct, the external reference is Added.
- procedure Reset;
+ procedure Reset (Tree : Prj.Tree.Project_Node_Tree_Ref);
-- Clear the internal data structure that stores the external references
-- and free any allocated memory.