aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj.adb
diff options
context:
space:
mode:
authorEmmanuel Briot <briot@adacore.com>2009-07-13 09:04:17 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-13 11:04:17 +0200
commitfc2c32e2a1de9332cf7dbe90f7bd7600945999c3 (patch)
tree0248d58807123b435413867f377c3448a7f12aef /gcc/ada/prj.adb
parent1629f7005208e42cede66374861c211c5a6d85e8 (diff)
downloadgcc-fc2c32e2a1de9332cf7dbe90f7bd7600945999c3.zip
gcc-fc2c32e2a1de9332cf7dbe90f7bd7600945999c3.tar.gz
gcc-fc2c32e2a1de9332cf7dbe90f7bd7600945999c3.tar.bz2
gnatcmd.adb, [...] (Immediate_Directory_Of): Removed.
2009-07-13 Emmanuel Briot <briot@adacore.com> * gnatcmd.adb, make.adb, mlib-prj.adb, prj-part.adb, mlib.adb, prj.adb, prj.ads, clean.adb, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb, prj-tree.ads (Immediate_Directory_Of): Removed. (Prj.Pars): Now parse the project simulating a default config file. (Add_Default_GNAT_Naming_Scheme): New subprogram (Check_Naming_Multi_Lang): Fix default value for Dot_Replacement. Remove gnatmake-specific parsing of source files. (Check_Illegal_Suffix): Renames Is_Illegal_Suffix, since it now raises the error itself to provide more precise diagnostics. (Process_Exceptions_Unit_Based): Avoid duplicate error message when a unit belongs to several projects. (Copy_Interface_Sources): Search the full path of files to copy in the list of sources of the application rather than in the list of units. (Parse_Project_And_Apply_Config): Do not reset the name of the main project file. (Check_File): Use htables to find out whether a source is duplicated. (Add_Source): check whether the source or unit were already seen earlier * gcc-interface/Makefile.in: Update gnatmake dependencies. From-SVN: r149557
Diffstat (limited to 'gcc/ada/prj.adb')
-rw-r--r--gcc/ada/prj.adb16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 94945c7..f9aca92 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -476,7 +476,8 @@ package body Prj is
function Find_Source
(In_Tree : Project_Tree_Ref;
Project : Project_Id;
- In_Imported_Only : Boolean;
+ In_Imported_Only : Boolean := False;
+ In_Extended_Only : Boolean := False;
Base_Name : File_Name_Type) return Source_Id
is
Result : Source_Id := No_Source;
@@ -506,10 +507,21 @@ package body Prj is
procedure For_Imported_Projects is new For_Every_Project_Imported
(State => Source_Id, Action => Look_For_Sources);
+ Proj : Project_Id;
+
-- Start of processing for Find_Source
begin
- if In_Imported_Only then
+ if In_Extended_Only then
+ Proj := Project;
+ while Proj /= No_Project loop
+ Look_For_Sources (Proj, Result);
+ exit when Result /= No_Source;
+
+ Proj := Proj.Extends;
+ end loop;
+
+ elsif In_Imported_Only then
Look_For_Sources (Project, Result);
if Result = No_Source then