From fccd42a9a5dca36c6c126b0f9fa632e8dd5f30e7 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 3 Aug 2011 17:27:54 +0200 Subject: [multiple changes] 2011-08-03 Yannick Moy * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean conditional expression in ALFA. * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean expressions as not in ALFA. 2011-08-03 Robert Dewar * a-cofove.adb: Minor reformatting. 2011-08-03 Emmanuel Briot * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads (Insert_Project_Sources, Insert_withed_Sources_For): moved from the gprbuild sources. These packages are more logically placed in the Queue package, since they manipulate the queue. It is also likely that they can be adapted for gnatmake, thus sharing more code. (Finish_Program, Fail_Program): moved from the gprbuild sources, so that we could move the above. 2011-08-03 Emmanuel Briot * errutil.adb (Finalize): clean up the list of error messages on exit. Calling this subprogram multiple times will no longer show duplicate error messages on stderr. 2011-08-03 Emmanuel Briot * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter Getopt_Switches when we have already define a command line configuration. From-SVN: r177286 --- gcc/ada/prj.adb | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'gcc/ada/prj.adb') diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb index b98bb13..7640bcf 100644 --- a/gcc/ada/prj.adb +++ b/gcc/ada/prj.adb @@ -144,6 +144,39 @@ package body Prj is end if; end Delete_Temporary_File; + ------------------------------ + -- Delete_Temp_Config_Files -- + ------------------------------ + + procedure Delete_Temp_Config_Files (Project_Tree : Project_Tree_Ref) is + Success : Boolean; + Proj : Project_List; + pragma Warnings (Off, Success); + + begin + if not Debug.Debug_Flag_N then + if Project_Tree /= null then + Proj := Project_Tree.Projects; + while Proj /= null loop + if Proj.Project.Config_File_Temp then + Delete_Temporary_File + (Project_Tree.Shared, Proj.Project.Config_File_Name); + + -- Make sure that we don't have a config file for this + -- project, in case there are several mains. In this case, + -- we will recreate another config file: we cannot reuse the + -- one that we just deleted! + + Proj.Project.Config_Checked := False; + Proj.Project.Config_File_Name := No_Path; + Proj.Project.Config_File_Temp := False; + end if; + Proj := Proj.Next; + end loop; + end if; + end if; + end Delete_Temp_Config_Files; + --------------------------- -- Delete_All_Temp_Files -- --------------------------- @@ -493,7 +526,8 @@ package body Prj is Project : Project_Id; In_Imported_Only : Boolean := False; In_Extended_Only : Boolean := False; - Base_Name : File_Name_Type) return Source_Id + Base_Name : File_Name_Type; + Index : Int := 0) return Source_Id is Result : Source_Id := No_Source; @@ -517,7 +551,9 @@ package body Prj is begin Iterator := For_Each_Source (In_Tree => Tree, Project => Proj); while Element (Iterator) /= No_Source loop - if Element (Iterator).File = Base_Name then + if Element (Iterator).File = Base_Name + and then (Index = 0 or else Element (Iterator).Index = Index) + then Src := Element (Iterator); return; end if; -- cgit v1.1