1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 2001 Free Software Foundation, Inc. --
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. --
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). --
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
;
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_Config_Pragmas_File
43 (For_Project
: Project_Id
;
44 Main_Project
: Project_Id
);
45 -- If there needs to have SFN pragmas, either for non standard naming
46 -- schemes or for individual units, or if Global_Configuration_Pragmas
47 -- has been specified in package gnatmake of the main project, or if
48 -- Local_Configuration_Pragmas has been specified in package Compiler
49 -- of the main project, build (if needed) a temporary file that contains
50 -- all configuration pragmas, and specify the configuration pragmas file
51 -- in the project data.
53 function Ada_Include_Path
(Project
: Project_Id
) return String_Access
;
54 -- Get the ADA_INCLUDE_PATH of a Project file. For the first call, compute
57 function Ada_Objects_Path
58 (Project
: Project_Id
;
59 Including_Libraries
: Boolean := True)
61 -- Get the ADA_OBJECTS_PATH of a Project file. For the first call, compute
62 -- it and cache it. When Including_Libraries is False, do not include the
63 -- object directories of the library projects, and do not cache the result.
65 function Path_Name_Of_Library_Unit_Body
69 -- Returns the Path of a library unit.
71 function File_Name_Of_Library_Unit_Body
75 -- Returns the file name of a library unit, in canonical case. Name may or
76 -- may not have an extension (corresponding to the naming scheme of the
77 -- project). If there is no body with this name, but there is a spec, the
78 -- name of the spec is returned. If neither a body or a spec can be found,
79 -- return an empty string.
81 procedure Get_Reference
82 (Source_File_Name
: String;
83 Project
: out Project_Id
;
85 -- Returns the project of a source.
88 with procedure Action
(Path
: String);
89 procedure For_All_Source_Dirs
(Project
: Project_Id
);
90 -- Iterate through all the source directories of a project,
91 -- including those of imported or modified projects.
94 with procedure Action
(Path
: String);
95 procedure For_All_Object_Dirs
(Project
: Project_Id
);
96 -- Iterate through all the object directories of a project,
97 -- including those of imported or modified projects.