diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-25 11:26:07 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-25 11:26:07 +0200 |
commit | fadcf3134557b94e1e52b8d9d6aa95e2ec2443ef (patch) | |
tree | 116462c37d01ba1b6c932ed55b7db566a03c056d /gcc/ada/make.adb | |
parent | 5b900a4520087e5e38fe938e55932e6bd779d1e9 (diff) | |
download | gcc-fadcf3134557b94e1e52b8d9d6aa95e2ec2443ef.zip gcc-fadcf3134557b94e1e52b8d9d6aa95e2ec2443ef.tar.gz gcc-fadcf3134557b94e1e52b8d9d6aa95e2ec2443ef.tar.bz2 |
[multiple changes]
2009-06-25 Emmanuel Briot <briot@adacore.com>
* gnatcmd.adb, prj-proc.adb, make.adb, prj.adb, prj.ads, prj-nmsc.adb,
prj-util.adb, prj-env.adb, prj-env.ads: Merge handling of naming_data
between gnatmake and gprbuild.
(Naming_Data): Removed, no longer used
(Naming_Table, Project_Tree_Ref.Namings): Removed, since this is only
needed locally in one subprogram, no need to store forever in the
structure.
(Check_Naming_Scheme, Check_Package_Naming): Merged, since they play
a similar role.
(Body_Suffix_Of, Body_Suffix_Id_Of, Register_Default_Naming_Scheme,
Same_Naming_Scheme, Set_Body_Suffix, Set_Spec_Suffix, Spec_Suffix_Of,
Spec_Suffix_Id_Of): removed, no longer used.
2009-06-25 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Allocator): Skip test requiring exact match of
types on qualified expression in calls to imported C++ constructors.
* exp_ch4.adb (Expand_Allocator_Expression): Add missing support for
imported C++ constructors.
2009-06-25 Sergey Rybin <rybin@adacore.com>
* vms_data.ads: Add qualifier for new gnatcheck '-t' option.
From-SVN: r148937
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r-- | gcc/ada/make.adb | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 8b1dbd5..8d7e6de 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -644,7 +644,7 @@ package body Make is (Source_File : File_Name_Type; Source_File_Name : String; Source_Index : Int; - Naming : Naming_Data; + Project : Project_Id; In_Package : Package_Id; Allow_ALI : Boolean) return Variable_Value; -- Return the switches for the source file in the specified package of a @@ -1274,7 +1274,7 @@ package body Make is (Source_File => Name_Find, Source_File_Name => File_Name, Source_Index => Index, - Naming => Main_Project.Naming, + Project => Main_Project, In_Package => The_Package, Allow_ALI => Program = Binder or else Program = Linker); @@ -2388,7 +2388,7 @@ package body Make is (Source_File => Source_File, Source_File_Name => Source_File_Name, Source_Index => Source_Index, - Naming => Arguments_Project.Naming, + Project => Arguments_Project, In_Package => Compiler_Package, Allow_ALI => False); @@ -3750,7 +3750,7 @@ package body Make is begin Prj.Env.Create_Config_Pragmas_File - (For_Project, Main_Project, Project_Tree); + (For_Project, Project_Tree); if For_Project.Config_File_Name /= No_Path then Temporary_Config_File := For_Project.Config_File_Temp; @@ -4235,6 +4235,8 @@ package body Make is File_Name : constant String := Base_Name (Main); -- The simple file name of the current main + Lang : Language_Ptr; + begin exit when Main = ""; @@ -4256,18 +4258,18 @@ package body Make is -- is the actual path of a source of a project. if Main /= File_Name then + Lang := Get_Language_From_Name (Main_Project, "ada"); + Real_Path := Locate_Regular_File - (Main & - Body_Suffix_Of - (Project_Tree, "ada", Main_Project.Naming), + (Main & Get_Name_String + (Lang.Config.Naming_Data.Body_Suffix), ""); if Real_Path = null then Real_Path := Locate_Regular_File - (Main & - Spec_Suffix_Of - (Project_Tree, "ada", Main_Project.Naming), + (Main & Get_Name_String + (Lang.Config.Naming_Data.Spec_Suffix), ""); end if; @@ -8122,10 +8124,12 @@ package body Make is (Source_File : File_Name_Type; Source_File_Name : String; Source_Index : Int; - Naming : Naming_Data; + Project : Project_Id; In_Package : Package_Id; Allow_ALI : Boolean) return Variable_Value is + Lang : constant Language_Ptr := Get_Language_From_Name (Project, "ada"); + Switches : Variable_Value; Defaults : constant Array_Element_Id := @@ -8156,14 +8160,17 @@ package body Make is -- Check also without the suffix - if Switches = Nil_Variable_Value then + if Switches = Nil_Variable_Value + and then Lang /= null + then declare + Naming : Lang_Naming_Data renames Lang.Config.Naming_Data; Name : String (1 .. Source_File_Name'Length + 3); Last : Positive := Source_File_Name'Length; Spec_Suffix : constant String := - Spec_Suffix_Of (Project_Tree, "ada", Naming); + Get_Name_String (Naming.Spec_Suffix); Body_Suffix : constant String := - Body_Suffix_Of (Project_Tree, "ada", Naming); + Get_Name_String (Naming.Body_Suffix); Truncated : Boolean := False; begin |