aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 17:27:54 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 17:27:54 +0200
commitfccd42a9a5dca36c6c126b0f9fa632e8dd5f30e7 (patch)
tree691e535ad779aa9a344f9ae0bfad919b3ee6b0a3 /gcc/ada/prj.adb
parent5e8c8e4457de992f8f7081f20aaf11778656d344 (diff)
downloadgcc-fccd42a9a5dca36c6c126b0f9fa632e8dd5f30e7.zip
gcc-fccd42a9a5dca36c6c126b0f9fa632e8dd5f30e7.tar.gz
gcc-fccd42a9a5dca36c6c126b0f9fa632e8dd5f30e7.tar.bz2
[multiple changes]
2011-08-03 Yannick Moy <moy@adacore.com> * 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 <dewar@adacore.com> * a-cofove.adb: Minor reformatting. 2011-08-03 Emmanuel Briot <briot@adacore.com> * 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 <briot@adacore.com> * 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 <briot@adacore.com> * 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
Diffstat (limited to 'gcc/ada/prj.adb')
-rw-r--r--gcc/ada/prj.adb40
1 files changed, 38 insertions, 2 deletions
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;