aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Briot <briot@adacore.com>2011-08-04 12:24:46 +0000
committerArnaud Charlet <charlet@adacore.com>2011-08-04 12:24:46 +0000
commit2247970ff6dc54f269ad40eff17f4e85c2770629 (patch)
tree8bab9631fe767a6dcb70040d240a9eed7d992f01
parentd413d5718b6711adfcdb0bf1ff3f0abfbfb10852 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@177370 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/makeutl.adb3
-rw-r--r--gcc/ada/prj.adb9
-rw-r--r--gcc/ada/prj.ads10
4 files changed, 19 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1214985df52..00681af1074 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
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>
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index 242df5e1497..ee8f0043e7d 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -1491,7 +1491,8 @@ package body Makeutl is
(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
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 670a0a074c3..133fca5cfa4 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -271,7 +271,7 @@ package body Prj is
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;
@@ -593,9 +593,10 @@ package body Prj is
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);
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index 5942abc17d2..710275747ff 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -1397,10 +1397,12 @@ package Prj is
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.
-----------------------