1------------------------------------------------------------------------------ 2-- -- 3-- GNAT COMPILER COMPONENTS -- 4-- -- 5-- P R J . P R O C -- 6-- -- 7-- S p e c -- 8-- -- 9-- Copyright (C) 2001-2011, Free Software Foundation, Inc. -- 10-- -- 11-- GNAT is free software; you can redistribute it and/or modify it under -- 12-- terms of the GNU General Public License as published by the Free Soft- -- 13-- ware Foundation; either version 3, or (at your option) any later ver- -- 14-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 15-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- 16-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- 17-- for more details. You should have received a copy of the GNU General -- 18-- Public License distributed with GNAT; see file COPYING3. If not, go to -- 19-- http://www.gnu.org/licenses for a complete copy of the license. -- 20-- -- 21-- GNAT was originally developed by the GNAT team at New York University. -- 22-- Extensive contributions were provided by Ada Core Technologies Inc. -- 23-- -- 24------------------------------------------------------------------------------ 25 26-- This package is used to convert a project file tree (see prj-tree.ads) to 27-- project file data structures (see prj.ads), taking into account the 28-- environment (external references). 29 30with Prj.Tree; use Prj.Tree; 31 32package Prj.Proc is 33 34 procedure Process_Project_Tree_Phase_1 35 (In_Tree : Project_Tree_Ref; 36 Project : out Project_Id; 37 Packages_To_Check : String_List_Access; 38 Success : out Boolean; 39 From_Project_Node : Project_Node_Id; 40 From_Project_Node_Tree : Project_Node_Tree_Ref; 41 Env : in out Prj.Tree.Environment; 42 Reset_Tree : Boolean := True); 43 -- Process a project tree (ie the direct resulting of parsing a .gpr file) 44 -- based on the current external references. 45 -- 46 -- The result of this phase_1 is a partial project tree (Project) where 47 -- only a few fields have been initialized (in particular the list of 48 -- languages). These are the fields that are necessary to run gprconfig if 49 -- needed to automatically generate a configuration file. This first phase 50 -- of the processing does not require a configuration file. 51 -- 52 -- When Reset_Tree is True, all the project data are removed from the 53 -- project table before processing. 54 55 procedure Process_Project_Tree_Phase_2 56 (In_Tree : Project_Tree_Ref; 57 Project : Project_Id; 58 Success : out Boolean; 59 From_Project_Node : Project_Node_Id; 60 From_Project_Node_Tree : Project_Node_Tree_Ref; 61 Env : Prj.Tree.Environment); 62 -- Perform the second phase of the processing, filling the rest of the 63 -- project with the information extracted from the project tree. This phase 64 -- requires that the configuration file has already been parsed (in fact 65 -- we currently assume that the contents of the configuration file has 66 -- been included in Project through Confgpr.Apply_Config_File). The 67 -- parameters are the same as for phase_1, with the addition of: 68 69 procedure Process 70 (In_Tree : Project_Tree_Ref; 71 Project : out Project_Id; 72 Packages_To_Check : String_List_Access; 73 Success : out Boolean; 74 From_Project_Node : Project_Node_Id; 75 From_Project_Node_Tree : Project_Node_Tree_Ref; 76 Env : in out Prj.Tree.Environment; 77 Reset_Tree : Boolean := True); 78 -- Performs the two phases of the processing 79 80end Prj.Proc; 81