OSDN Git Service

* sem_res.adb (Resolve_Selected_Component): do not generate a
[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.
44    --  For each unit, put the mapping of its spec and or body to its
45    --  file name and path name in this file.
46
47    procedure Create_Config_Pragmas_File
48      (For_Project  : Project_Id;
49       Main_Project : Project_Id);
50    --  If there needs to have SFN pragmas, either for non standard naming
51    --  schemes or for individual units, or if Global_Configuration_Pragmas
52    --  has been specified in package gnatmake of the main project, or if
53    --  Local_Configuration_Pragmas has been specified in package Compiler
54    --  of the main project, build (if needed) a temporary file that contains
55    --  all configuration pragmas, and specify the configuration pragmas file
56    --  in the project data.
57
58    function Ada_Include_Path (Project : Project_Id) return String_Access;
59    --  Get the ADA_INCLUDE_PATH of a Project file. For the first call, compute
60    --  it and cache it.
61
62    function Ada_Objects_Path
63      (Project             : Project_Id;
64       Including_Libraries : Boolean := True)
65       return                String_Access;
66    --  Get the ADA_OBJECTS_PATH of a Project file. For the first call, compute
67    --  it and cache it. When Including_Libraries is False, do not include the
68    --  object directories of the library projects, and do not cache the result.
69
70    function Path_Name_Of_Library_Unit_Body
71      (Name    : String;
72       Project : Project_Id)
73       return    String;
74    --  Returns the Path of a library unit.
75
76    function File_Name_Of_Library_Unit_Body
77      (Name    : String;
78       Project : Project_Id)
79       return    String;
80    --  Returns the file name of a library unit, in canonical case. Name may or
81    --  may not have an extension (corresponding to the naming scheme of the
82    --  project). If there is no body with this name, but there is a spec, the
83    --  name of the spec is returned. If neither a body or a spec can be found,
84    --  return an empty string.
85
86    procedure Get_Reference
87      (Source_File_Name : String;
88       Project          : out Project_Id;
89       Path             : out Name_Id);
90    --  Returns the project of a source.
91
92    generic
93       with procedure Action (Path : String);
94    procedure For_All_Source_Dirs (Project : Project_Id);
95    --  Iterate through all the source directories of a project,
96    --  including those of imported or modified projects.
97
98    generic
99       with procedure Action (Path : String);
100    procedure For_All_Object_Dirs (Project : Project_Id);
101    --  Iterate through all the object directories of a project,
102    --  including those of imported or modified projects.
103
104 end Prj.Env;