OSDN Git Service

2007-04-20 Arnaud Charlet <charlet@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / prj-makr.adb
index 2fedbe7..6606afb 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2001-2006, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -25,7 +25,6 @@
 ------------------------------------------------------------------------------
 
 with Csets;
-with Namet;    use Namet;
 with Opt;
 with Output;
 with Osint;    use Osint;
@@ -40,18 +39,30 @@ with Table;    use Table;
 
 with Ada.Characters.Handling;   use Ada.Characters.Handling;
 with GNAT.Directory_Operations; use GNAT.Directory_Operations;
-with GNAT.Regexp;               use GNAT.Regexp;
 
 with System.Case_Util;          use System.Case_Util;
 with System.CRTL;
+with System.Regexp;             use System.Regexp;
 
 package body Prj.Makr is
 
+   --  Packages of project files where unknown attributes are errors
+
+   --  All the following need comments ??? All global variables and
+   --  subprograms must be fully commented.
+
+   Naming_String : aliased String := "naming";
+
+   Gnatname_Packages : aliased String_List := (1 => Naming_String'Access);
+
+   Packages_To_Check_By_Gnatname : constant String_List_Access :=
+                                     Gnatname_Packages'Access;
+
    function Dup (Fd : File_Descriptor) return File_Descriptor;
 
    procedure Dup2 (Old_Fd, New_Fd : File_Descriptor);
 
-   Gcc : constant String := "gcc";
+   Gcc      : constant String := "gcc";
    Gcc_Path : String_Access := null;
 
    Non_Empty_Node : constant Project_Node_Id := 1;
@@ -79,7 +90,7 @@ package body Prj.Makr is
       Table_Index_Type     => Natural,
       Table_Low_Bound      => 0,
       Table_Initial        => 10,
-      Table_Increment      => 10,
+      Table_Increment      => 100,
       Table_Name           => "Prj.Makr.Processed_Directories");
 
    ---------
@@ -172,7 +183,7 @@ package body Prj.Makr is
          Table_Index_Type     => Natural,
          Table_Low_Bound      => 0,
          Table_Initial        => 50,
-         Table_Increment      => 50,
+         Table_Increment      => 100,
          Table_Name           => "Prj.Makr.SFN_Pragmas");
 
       procedure Process_Directory (Dir_Name : String; Recursively : Boolean);
@@ -730,7 +741,8 @@ package body Prj.Makr is
                Project                => Project_Node,
                Project_File_Name      => Output_Name (1 .. Output_Name_Last),
                Always_Errout_Finalize => False,
-               Store_Comments         => True);
+               Store_Comments         => True,
+               Packages_To_Check      => Packages_To_Check_By_Gnatname);
 
             --  Fail if parsing was not successful