From: Vincent Celier Date: Thu, 23 Jan 2014 16:39:02 +0000 (+0000) Subject: prj-conf.adb (Get_Or_Create_Configuration_File): Never parse a config project file... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=225a0c5c56d59d37dc06f98e8388a21c9bc6d02f;p=gcc.git prj-conf.adb (Get_Or_Create_Configuration_File): Never parse a config project file if On_Load_Config is not null. 2014-01-23 Vincent Celier * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse a config project file if On_Load_Config is not null. * prj-pars.adb: Minor comment changes. From-SVN: r206984 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a6d83c8054b..5bf50ad1edd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2014-01-23 Vincent Celier + + * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse + a config project file if On_Load_Config is not null. + * prj-pars.adb: Minor comment changes. + 2014-01-23 Ed Schonberg * lib-xref.adb (Output_References): Output progenitors of diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index 225e0e87f6b..de4e980ffa7 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -1420,12 +1420,17 @@ package body Prj.Conf is -- Parse the configuration file - if Verbose_Mode and then Config_File_Path /= null then + if Verbose_Mode + and then Config_File_Path /= null + and then On_Load_Config = null + then Write_Str ("Checking configuration "); Write_Line (Config_File_Path.all); end if; - if Config_File_Path /= null then + -- Add comment for On_Load_Config test ??? + + if Config_File_Path /= null and then On_Load_Config = null then Prj.Part.Parse (In_Tree => Project_Node_Tree, Project => Config_Project_Node, diff --git a/gcc/ada/prj-pars.adb b/gcc/ada/prj-pars.adb index 3aba38dcfa1..a0d083488cf 100644 --- a/gcc/ada/prj-pars.adb +++ b/gcc/ada/prj-pars.adb @@ -83,9 +83,6 @@ package body Prj.Pars is -- However, we will simulate one that only contains the default -- GNAT naming scheme. - -- We pass an invalid config_file_name, to prevent reading a - -- default.cgpr that might happen to be in the current directory. - Process_Project_And_Apply_Config (Main_Project => The_Project, User_Project_Node => Project_Node,