diff options
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index 4fbc0a7..b302972 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -82,10 +82,12 @@ package body Prj.Proc is (In_Tree : Project_Tree_Ref; Project : Project_Id; Current_Dir : String; - When_No_Sources : Error_Warning); + When_No_Sources : Error_Warning; + Is_Config_File : Boolean); -- Set all projects to not checked, then call Recursive_Check for the -- main project Project. Project is set to No_Project if errors occurred. -- Current_Dir is for optimization purposes, avoiding extra system calls. + -- Is_Config_File should be True if Project is a config file (.cgpr) procedure Copy_Package_Declarations (From : Declarations; @@ -149,6 +151,7 @@ package body Prj.Proc is Current_Dir : String_Access; When_No_Sources : Error_Warning; Proc_Data : Processing_Data; + Is_Config_File : Boolean; end record; -- Data passed to Recursive_Check -- Current_Dir is for optimization purposes, avoiding extra system calls. @@ -279,7 +282,8 @@ package body Prj.Proc is (In_Tree : Project_Tree_Ref; Project : Project_Id; Current_Dir : String; - When_No_Sources : Error_Warning) + When_No_Sources : Error_Warning; + Is_Config_File : Boolean) is Dir : aliased String := Current_Dir; @@ -292,6 +296,7 @@ package body Prj.Proc is Data.In_Tree := In_Tree; Data.Current_Dir := Dir'Unchecked_Access; Data.When_No_Sources := When_No_Sources; + Data.Is_Config_File := Is_Config_File; Initialize (Data.Proc_Data); Check_All_Projects (Project, Data, Imported_First => True); @@ -1231,7 +1236,8 @@ package body Prj.Proc is Report_Error : Put_Line_Access; When_No_Sources : Error_Warning := Error; Reset_Tree : Boolean := True; - Current_Dir : String := "") + Current_Dir : String := ""; + Is_Config_File : Boolean) is begin Process_Project_Tree_Phase_1 @@ -1243,7 +1249,7 @@ package body Prj.Proc is Report_Error => Report_Error, Reset_Tree => Reset_Tree); - if not In_Configuration then + if not Is_Config_File then Process_Project_Tree_Phase_2 (In_Tree => In_Tree, Project => Project, @@ -1252,7 +1258,8 @@ package body Prj.Proc is From_Project_Node_Tree => From_Project_Node_Tree, Report_Error => Report_Error, When_No_Sources => When_No_Sources, - Current_Dir => Current_Dir); + Current_Dir => Current_Dir, + Is_Config_File => Is_Config_File); end if; end Process; @@ -2305,7 +2312,8 @@ package body Prj.Proc is From_Project_Node_Tree : Project_Node_Tree_Ref; Report_Error : Put_Line_Access; When_No_Sources : Error_Warning := Error; - Current_Dir : String) + Current_Dir : String; + Is_Config_File : Boolean) is Obj_Dir : Path_Name_Type; Extending : Project_Id; @@ -2319,7 +2327,8 @@ package body Prj.Proc is Success := True; if Project /= No_Project then - Check (In_Tree, Project, Current_Dir, When_No_Sources); + Check (In_Tree, Project, Current_Dir, When_No_Sources, + Is_Config_File => Is_Config_File); end if; -- If main project is an extending all project, set the object @@ -2442,7 +2451,8 @@ package body Prj.Proc is Prj.Nmsc.Check (Project, Data.In_Tree, Error_Report, Data.When_No_Sources, - Data.Current_Dir.all, Data.Proc_Data); + Data.Current_Dir.all, Data.Proc_Data, + Is_Config_File => Data.Is_Config_File); end Recursive_Check; ----------------------- |