Daily bump.
[official-gcc.git] / gcc / ada / prj-env.ads
blob7c18e2422426fc3f1255062aecf2b4240013e661
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- P R J . E N V --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.3 $
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 -- Extensive contributions were provided by Ada Core Technologies Inc. --
26 -- --
27 ------------------------------------------------------------------------------
29 -- This package implements services for Project-aware tools, related
30 -- to the environment (gnat.adc, ADA_INCLUDE_PATH, ADA_OBJECTS_PATH)
32 with GNAT.OS_Lib; use GNAT.OS_Lib;
34 package Prj.Env is
36 procedure Initialize;
37 -- Put Standard_Naming_Data into Namings table (called by Prj.Initialize)
39 procedure Print_Sources;
40 -- Output the list of sources, after Project files have been scanned
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.
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.
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.
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.
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.
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.
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.
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.
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.
103 end Prj.Env;