]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/prj-env.ads
1aexcept.adb, [...]: Merge header, formatting and other trivial changes from ACT.
[gcc.git] / gcc / ada / prj-env.ads
CommitLineData
19235870
RK
1------------------------------------------------------------------------------
2-- --
3-- GNAT COMPILER COMPONENTS --
4-- --
5-- P R J . E N V --
6-- --
7-- S p e c --
8-- --
07fc65c4 9-- Copyright (C) 2001-2002 Free Software Foundation, Inc --
19235870
RK
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 2, 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 COPYING. If not, write --
19-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20-- MA 02111-1307, USA. --
21-- --
22-- GNAT was originally developed by the GNAT team at New York University. --
71ff80dc 23-- Extensive contributions were provided by Ada Core Technologies Inc. --
19235870
RK
24-- --
25------------------------------------------------------------------------------
26
27-- This package implements services for Project-aware tools, related
28-- to the environment (gnat.adc, ADA_INCLUDE_PATH, ADA_OBJECTS_PATH)
29
30with GNAT.OS_Lib; use GNAT.OS_Lib;
31
32package Prj.Env is
33
34 procedure Initialize;
35 -- Put Standard_Naming_Data into Namings table (called by Prj.Initialize)
36
37 procedure Print_Sources;
38 -- Output the list of sources, after Project files have been scanned
39
6510f4c9 40 procedure Create_Mapping_File (Name : in out Temp_File_Name);
17c5c8a5
GB
41 -- Create a temporary mapping file. For each unit, put the mapping of
42 -- its spec and or body to its file name and path name in this file.
6510f4c9 43
07fc65c4
GB
44 procedure Set_Mapping_File_Initial_State_To_Empty;
45 -- When creating a mapping file, create an empty map. This case occurs
46 -- when run time source files are found in the project files.
47
19235870
RK
48 procedure Create_Config_Pragmas_File
49 (For_Project : Project_Id;
50 Main_Project : Project_Id);
51 -- If there needs to have SFN pragmas, either for non standard naming
52 -- schemes or for individual units, or if Global_Configuration_Pragmas
53 -- has been specified in package gnatmake of the main project, or if
54 -- Local_Configuration_Pragmas has been specified in package Compiler
55 -- of the main project, build (if needed) a temporary file that contains
56 -- all configuration pragmas, and specify the configuration pragmas file
57 -- in the project data.
58
59 function Ada_Include_Path (Project : Project_Id) return String_Access;
60 -- Get the ADA_INCLUDE_PATH of a Project file. For the first call, compute
61 -- it and cache it.
62
07fc65c4
GB
63 function Ada_Include_Path
64 (Project : Project_Id;
65 Recursive : Boolean)
66 return String;
67 -- Get the ADA_INCLUDE_PATH of a Project file. If Recursive it True,
68 -- get all the source directories of the imported and modified project
69 -- files (recursively). If Recursive is False, just get the path for the
70 -- source directories of Project. Note: the resulting String may be empty
71 -- if there is no source directory in the project file.
72
19235870
RK
73 function Ada_Objects_Path
74 (Project : Project_Id;
75 Including_Libraries : Boolean := True)
76 return String_Access;
77 -- Get the ADA_OBJECTS_PATH of a Project file. For the first call, compute
78 -- it and cache it. When Including_Libraries is False, do not include the
79 -- object directories of the library projects, and do not cache the result.
80
81 function Path_Name_Of_Library_Unit_Body
82 (Name : String;
83 Project : Project_Id)
84 return String;
85 -- Returns the Path of a library unit.
86
87 function File_Name_Of_Library_Unit_Body
88 (Name : String;
89 Project : Project_Id)
90 return String;
91 -- Returns the file name of a library unit, in canonical case. Name may or
92 -- may not have an extension (corresponding to the naming scheme of the
93 -- project). If there is no body with this name, but there is a spec, the
94 -- name of the spec is returned. If neither a body or a spec can be found,
95 -- return an empty string.
96
97 procedure Get_Reference
98 (Source_File_Name : String;
99 Project : out Project_Id;
100 Path : out Name_Id);
101 -- Returns the project of a source.
102
103 generic
104 with procedure Action (Path : String);
105 procedure For_All_Source_Dirs (Project : Project_Id);
106 -- Iterate through all the source directories of a project,
107 -- including those of imported or modified projects.
108
109 generic
110 with procedure Action (Path : String);
111 procedure For_All_Object_Dirs (Project : Project_Id);
112 -- Iterate through all the object directories of a project,
113 -- including those of imported or modified projects.
114
115end Prj.Env;
This page took 0.413117 seconds and 5 git commands to generate.