diff options
Diffstat (limited to 'gcc/ada/make.adb')
| -rw-r--r-- | gcc/ada/make.adb | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 15d6ed0..89b0d69 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -828,9 +828,8 @@ package body Make is else while Last_Argument + Args'Length > Arguments'Last loop declare - New_Arguments : Argument_List_Access := - new Argument_List (1 .. Arguments'Last * 2); - + New_Arguments : constant Argument_List_Access := + new Argument_List (1 .. Arguments'Last * 2); begin New_Arguments (1 .. Last_Argument) := Arguments (1 .. Last_Argument); @@ -2553,8 +2552,13 @@ package body Make is Check_Source_Files := True; All_Sources := False; - Insert_Q (Main_Source); - Mark (Main_Source); + -- Only insert in the Q if it is not already done, to avoid simultaneous + -- compilations if -jnnn is used. + + if not Is_Marked (Main_Source) then + Insert_Q (Main_Source); + Mark (Main_Source); + end if; First_Compiled_File := No_File; Most_Recent_Obj_File := No_File; @@ -4305,18 +4309,6 @@ package body Make is Multiple_Main_Loop : for N_File in 1 .. Osint.Number_Of_Files loop - -- Increase the marking label to be sure to check sources - -- for all executables. - - Marking_Label := Marking_Label + 1; - - -- Make sure it is not 0, which is the default value for - -- a file that has never been marked. - - if Marking_Label = 0 then - Marking_Label := 1; - end if; - -- First, find the executable name and path Executable := No_File; @@ -5443,6 +5435,18 @@ package body Make is end; end if; end if; + + -- Increase the marking label to be sure to check sources + -- for all executables. + + Marking_Label := Marking_Label + 1; + + -- Make sure it is not 0, which is the default value for + -- a file that has never been marked. + + if Marking_Label = 0 then + Marking_Label := 1; + end if; end loop Multiple_Main_Loop; if Failed_Links.Last > 0 then @@ -7214,7 +7218,8 @@ package body Make is end Verbose_Msg; begin + -- Make sure that in case of failure, the temp files will be deleted + Prj.Com.Fail := Make_Failed'Access; MLib.Fail := Make_Failed'Access; - -- Make sure that in case of failure, the temp files will be deleted end Make; |
