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.
2011-08-04 Vincent Celier <celier@adacore.com>
(In_Tree => File.Tree,
Project => File.Project,
Base_Name => Main_Id,
- Index => File.Index);
+ Index => File.Index,
+ In_Imported_Only => True);
if Source = No_Source then
Source := Find_File_Add_Extension
begin
-- 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;
return Data;
if Result = No_Source then
For_Imported_Projects
- (By => Project,
- Tree => In_Tree,
- With_State => Result);
+ (By => Project,
+ Tree => In_Tree,
+ Include_Aggregated => False,
+ With_State => Result);
end if;
else
Look_For_Sources (No_Project, In_Tree, Result);
In_Extended_Only : Boolean := False;
Base_Name : File_Name_Type;
Index : Int := 0) return Source_Id;
- -- Find the first source file with the given name either in the whole tree
- -- (if In_Imported_Only is False) or in the projects imported or extended
- -- by Project otherwise. In_Extended_Only implies In_Imported_Only, and
- -- will only look in Project and the projects it extends.
+ -- Find the first source file with the given name.
+ -- If In_Extended_Only is True, it will search in project and the project
+ -- it extends, but not in the imported projects.
+ -- 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.
-----------------------