From fc2c32e2a1de9332cf7dbe90f7bd7600945999c3 Mon Sep 17 00:00:00 2001 From: Emmanuel Briot Date: Mon, 13 Jul 2009 09:04:17 +0000 Subject: gnatcmd.adb, [...] (Immediate_Directory_Of): Removed. 2009-07-13 Emmanuel Briot * 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 --- gcc/ada/prj.adb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'gcc/ada/prj.adb') 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 -- cgit v1.1