OSDN Git Service

* bindgen.adb: Minor reformatting
[pf3gnuchains/gcc-fork.git] / gcc / ada / prj-env.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              P R J . E N V                               --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision$
10 --                                                                          --
11 --             Copyright (C) 2001 Free Software Foundation, Inc.            --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- GNAT was originally developed  by the GNAT team at  New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 --                                                                          --
27 ------------------------------------------------------------------------------
28
29 --  This package implements services for Project-aware tools, related
30 --  to the environment (gnat.adc, ADA_INCLUDE_PATH, ADA_OBJECTS_PATH)
31
32 with GNAT.OS_Lib; use GNAT.OS_Lib;
33
34 package Prj.Env is
35
36    procedure Initialize;
37    --  Put Standard_Naming_Data into Namings table (called by Prj.Initialize)
38
39    procedure Print_Sources;
40    --  Output the list of sources, after Project files have been scanned
41
42    procedure Create_Mapping_File (Name : in out Temp_File_Name);
43    --  Create a temporary mapping file. For each unit, put the mapping of
44    --  its spec and or body to its file name and path name in this file.
45
46    procedure Create_Config_Pragmas_File
47      (For_Project  : Project_Id;
48       Main_Project : Project_Id);
49    --  If there needs to have SFN pragmas, either for non standard naming
50    --  schemes or for individual units, or if Global_Configuration_Pragmas
51    --  has been specified in package gnatmake of the main project, or if
52    --  Local_Configuration_Pragmas has been specified in package Compiler
53    --  of the main project, build (if needed) a temporary file that contains
54    --  all configuration pragmas, and specify the configuration pragmas file
55    --  in the project data.
56
57    function Ada_Include_Path (Project : Project_Id) return String_Access;
58    --  Get the ADA_INCLUDE_PATH of a Project file. For the first call, compute
59    --  it and cache it.
60
61    function Ada_Objects_Path
62      (Project             : Project_Id;
63       Including_Libraries : Boolean := True)
64       return                String_Access;
65    --  Get the ADA_OBJECTS_PATH of a Project file. For the first call, compute
66    --  it and cache it. When Including_Libraries is False, do not include the
67    --  object directories of the library projects, and do not cache the result.
68
69    function Path_Name_Of_Library_Unit_Body
70      (Name    : String;
71       Project : Project_Id)
72       return    String;
73    --  Returns the Path of a library unit.
74
75    function File_Name_Of_Library_Unit_Body
76      (Name    : String;
77       Project : Project_Id)
78       return    String;
79    --  Returns the file name of a library unit, in canonical case. Name may or
80    --  may not have an extension (corresponding to the naming scheme of the
81    --  project). If there is no body with this name, but there is a spec, the
82    --  name of the spec is returned. If neither a body or a spec can be found,
83    --  return an empty string.
84
85    procedure Get_Reference
86      (Source_File_Name : String;
87       Project          : out Project_Id;
88       Path             : out Name_Id);
89    --  Returns the project of a source.
90
91    generic
92       with procedure Action (Path : String);
93    procedure For_All_Source_Dirs (Project : Project_Id);
94    --  Iterate through all the source directories of a project,
95    --  including those of imported or modified projects.
96
97    generic
98       with procedure Action (Path : String);
99    procedure For_All_Object_Dirs (Project : Project_Id);
100    --  Iterate through all the object directories of a project,
101    --  including those of imported or modified projects.
102
103 end Prj.Env;