prj-conf.adb (Get_Or_Create_Configuration_File): Never parse a config project file...
authorVincent Celier <celier@adacore.com>
Thu, 23 Jan 2014 16:39:02 +0000 (16:39 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 23 Jan 2014 16:39:02 +0000 (17:39 +0100)
2014-01-23  Vincent Celier  <celier@adacore.com>

* 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

gcc/ada/ChangeLog
gcc/ada/prj-conf.adb
gcc/ada/prj-pars.adb

index a6d83c8054b99e3d503f22c62c278e44d94db0d5..5bf50ad1edd70078011f7a165f78a1651a87ded3 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-23  Vincent Celier  <celier@adacore.com>
+
+       * 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  <schonberg@adacore.com>
 
        * lib-xref.adb (Output_References): Output progenitors of
index 225e0e87f6b8b1aa2e9112a711ceda906ba698e6..de4e980ffa7eac5c175073be7c653ea9f9a2206a 100644 (file)
@@ -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,
index 3aba38dcfa174a0d88fa116fdb9e3fc2e63d1994..a0d083488cf3b795b70b1dcda3d767b3530bd954 100644 (file)
@@ -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,