diff options
author | Emmanuel Briot <briot@adacore.com> | 2009-07-13 09:04:17 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-13 11:04:17 +0200 |
commit | fc2c32e2a1de9332cf7dbe90f7bd7600945999c3 (patch) | |
tree | 0248d58807123b435413867f377c3448a7f12aef /gcc/ada/make.adb | |
parent | 1629f7005208e42cede66374861c211c5a6d85e8 (diff) | |
download | gcc-fc2c32e2a1de9332cf7dbe90f7bd7600945999c3.zip gcc-fc2c32e2a1de9332cf7dbe90f7bd7600945999c3.tar.gz gcc-fc2c32e2a1de9332cf7dbe90f7bd7600945999c3.tar.bz2 |
gnatcmd.adb, [...] (Immediate_Directory_Of): Removed.
2009-07-13 Emmanuel Briot <briot@adacore.com>
* gnatcmd.adb, make.adb, mlib-prj.adb, prj-part.adb, mlib.adb,
prj.adb, prj.ads, clean.adb, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb,
prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
prj-tree.ads (Immediate_Directory_Of): Removed.
(Prj.Pars): Now parse the project simulating a default config file.
(Add_Default_GNAT_Naming_Scheme): New subprogram
(Check_Naming_Multi_Lang): Fix default value for Dot_Replacement.
Remove gnatmake-specific parsing of source files.
(Check_Illegal_Suffix): Renames Is_Illegal_Suffix, since it now raises
the error itself to provide more precise diagnostics.
(Process_Exceptions_Unit_Based): Avoid duplicate error message when
a unit belongs to several projects.
(Copy_Interface_Sources): Search the full path of files to copy in the
list of sources of the application rather than in the list of units.
(Parse_Project_And_Apply_Config): Do not reset the name of the main
project file.
(Check_File): Use htables to find out whether a source is duplicated.
(Add_Source): check whether the source or unit were already seen earlier
* gcc-interface/Makefile.in: Update gnatmake dependencies.
From-SVN: r149557
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r-- | gcc/ada/make.adb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index f91d705..3d370be 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -1978,12 +1978,8 @@ package body Make is Name_Len := 0; Add_Str_To_Name_Buffer (Res_Obj_Dir); - if Name_Len > 1 and then - (Name_Buffer (Name_Len) = '/' - or else - Name_Buffer (Name_Len) = Directory_Separator) - then - Name_Len := Name_Len - 1; + if not Is_Directory_Separator (Name_Buffer (Name_Len)) then + Add_Char_To_Name_Buffer (Directory_Separator); end if; Obj_Dir := Name_Find; @@ -4450,8 +4446,8 @@ package body Make is (ALI_Project.Object_Directory.Name); end if; - if Name_Buffer (Name_Len) /= - Directory_Separator + if not Is_Directory_Separator + (Name_Buffer (Name_Len)) then Add_Char_To_Name_Buffer (Directory_Separator); end if; @@ -5312,7 +5308,9 @@ package body Make is if not Is_Absolute_Path (Exec_File_Name) then Get_Name_String (Main_Project.Exec_Directory.Name); - if Name_Buffer (Name_Len) /= Directory_Separator then + if + not Is_Directory_Separator (Name_Buffer (Name_Len)) + then Add_Char_To_Name_Buffer (Directory_Separator); end if; @@ -6867,8 +6865,7 @@ package body Make is (Project => Main_Project, In_Tree => Project_Tree, Project_File_Name => Project_File_Name.all, - Packages_To_Check => Packages_To_Check_By_Gnatmake, - Is_Config_File => False); + Packages_To_Check => Packages_To_Check_By_Gnatmake); -- The parsing of project files may have changed the current output @@ -7611,8 +7608,7 @@ package body Make is -- separator. if Argv (Argv'Last) = Directory_Separator then - Object_Directory_Path := - new String'(Argv); + Object_Directory_Path := new String'(Argv); else Object_Directory_Path := new String'(Argv & Directory_Separator); |