Commit 767ab2fd by Emmanuel Briot Committed by Arnaud Charlet

prj.adb, [...] (Complete_Mains): search for the sources in the project and its imported projects...

2011-08-04  Emmanuel Briot  <briot@adacore.com>

	* prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
	sources in the project and its imported projects, but not in the whole
	tree.

From-SVN: r177370
parent 8fb3f5df
2011-08-04 Emmanuel Briot <briot@adacore.com> 2011-08-04 Emmanuel Briot <briot@adacore.com>
* prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
sources in the project and its imported projects, but not in the whole
tree.
2011-08-04 Emmanuel Briot <briot@adacore.com>
* make.adb: Remove debug trace. * make.adb: Remove debug trace.
2011-08-04 Vincent Celier <celier@adacore.com> 2011-08-04 Vincent Celier <celier@adacore.com>
......
...@@ -1491,7 +1491,8 @@ package body Makeutl is ...@@ -1491,7 +1491,8 @@ package body Makeutl is
(In_Tree => File.Tree, (In_Tree => File.Tree,
Project => File.Project, Project => File.Project,
Base_Name => Main_Id, Base_Name => Main_Id,
Index => File.Index); Index => File.Index,
In_Imported_Only => True);
if Source = No_Source then if Source = No_Source then
Source := Find_File_Add_Extension Source := Find_File_Add_Extension
......
...@@ -271,7 +271,7 @@ package body Prj is ...@@ -271,7 +271,7 @@ package body Prj is
begin begin
-- Only the fields for which no default value could be provided in -- Only the fields for which no default value could be provided in
-- prj.ads are initialized below -- prj.ads are initialized below.
Data.Config := Default_Project_Config; Data.Config := Default_Project_Config;
return Data; return Data;
...@@ -595,6 +595,7 @@ package body Prj is ...@@ -595,6 +595,7 @@ package body Prj is
For_Imported_Projects For_Imported_Projects
(By => Project, (By => Project,
Tree => In_Tree, Tree => In_Tree,
Include_Aggregated => False,
With_State => Result); With_State => Result);
end if; end if;
else else
......
...@@ -1397,10 +1397,12 @@ package Prj is ...@@ -1397,10 +1397,12 @@ package Prj is
In_Extended_Only : Boolean := False; In_Extended_Only : Boolean := False;
Base_Name : File_Name_Type; Base_Name : File_Name_Type;
Index : Int := 0) return Source_Id; Index : Int := 0) return Source_Id;
-- Find the first source file with the given name either in the whole tree -- Find the first source file with the given name.
-- (if In_Imported_Only is False) or in the projects imported or extended -- If In_Extended_Only is True, it will search in project and the project
-- by Project otherwise. In_Extended_Only implies In_Imported_Only, and -- it extends, but not in the imported projects.
-- will only look in Project and the projects it extends. -- Elsif In_Imported_Only is True, it will search in project and the
-- projects it imports, but not in the others or in aggregated projects.
-- Else it searches in the whole tree.
-- If Index is specified, this only search for a source with that index. -- If Index is specified, this only search for a source with that index.
----------------------- -----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment