diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-05 14:03:26 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-05 14:03:26 +0000 |
commit | 2a89a8b8810f51953d64b00269d345ab0f245862 (patch) | |
tree | c98aa3ecb61a2e5173fcd4de08b151155561d45e | |
parent | 90fe9e7d3f17539c71370c927961e931abf5291e (diff) | |
download | gcc-2a89a8b8810f51953d64b00269d345ab0f245862.tar.gz |
2011-09-05 Pascal Obry <obry@adacore.com>
* prj-nmsc.adb: Minor reformatting.
Add support for standalone aggregate library.
(Check_Stand_Alone_Library): Handle standalone aggregate library.
* projects.texi: Fix documentation for aggregate library projects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178546 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 38 | ||||
-rw-r--r-- | gcc/ada/projects.texi | 1 |
3 files changed, 32 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 852f937ff98..0b6ae3fb9df 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2011-09-05 Pascal Obry <obry@adacore.com> + + * prj-nmsc.adb: Minor reformatting. + Add support for standalone aggregate library. + (Check_Stand_Alone_Library): Handle standalone aggregate library. + * projects.texi: Fix documentation for aggregate library projects. + 2011-09-05 Robert Dewar <dewar@adacore.com> * sem_ch6.adb: Minor reformatting. diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index bf6f4cbf39e..9ebd3003aa3 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -2717,8 +2717,8 @@ package body Prj.Nmsc is Source := Prj.Element (Iter); exit when Source = No_Source; - if Source.Unit /= No_Unit_Index and then - Source.Unit.Name = Name_Id (Name) + if Source.Unit /= No_Unit_Index + and then Source.Unit.Name = Name_Id (Name) then if not Source.Locally_Removed then Source.In_Interfaces := True; @@ -2870,8 +2870,8 @@ package body Prj.Nmsc is end if; end if; - elsif Project.Library_Kind /= Static and then - Proj.Library_Kind = Static + elsif Project.Library_Kind /= Static + and then Proj.Library_Kind = Static then Error_Msg_Name_1 := Project.Name; Error_Msg_Name_2 := Proj.Name; @@ -3193,8 +3193,8 @@ package body Prj.Nmsc is Lib_ALI_Dir.Location, Project); end if; - if (not Project.Externally_Built) and then - Project.Library_ALI_Dir /= Project.Library_Dir + if not Project.Externally_Built + and then Project.Library_ALI_Dir /= Project.Library_Dir then -- The library ALI directory cannot be the same as the -- Object directory. @@ -4435,7 +4435,18 @@ package body Prj.Nmsc is Error_Msg_Name_1 := Unit; Next_Proj := Project.Extends; - Iter := For_Each_Source (Data.Tree, Project); + + if Project.Qualifier = Aggregate_Library then + + -- For an aggregate library we want to consider sources + -- of all aggregated projects. + + Iter := For_Each_Source (Data.Tree); + + else + Iter := For_Each_Source (Data.Tree, Project); + end if; + loop while Prj.Element (Iter) /= No_Source and then @@ -4467,6 +4478,7 @@ package body Prj.Nmsc is if Source /= No_Source then if Source.Project /= Project and then not Is_Extending (Project, Source.Project) + and then Project.Qualifier /= Aggregate_Library then Source := No_Source; end if; @@ -4952,10 +4964,10 @@ package body Prj.Nmsc is and then Name_Len > 3 and then Name_Buffer (2 .. 3) = "__" and then - ((Name_Buffer (1) = 'a') or else - (Name_Buffer (1) = 'g') or else - (Name_Buffer (1) = 'i') or else - (Name_Buffer (1) = 's')) + (Name_Buffer (1) = 'a' or else + Name_Buffer (1) = 'g' or else + Name_Buffer (1) = 'i' or else + Name_Buffer (1) = 's') then Name_Buffer (2) := '.'; Name_Buffer (3 .. Name_Len - 1) := Name_Buffer (4 .. Name_Len); @@ -5054,8 +5066,8 @@ package body Prj.Nmsc is OK := OK and then not Need_Letter and then not Last_Underscore; if OK then - if First /= Name'First and then - Is_Reserved (The_Name (First .. The_Name'Last)) + if First /= Name'First + and then Is_Reserved (The_Name (First .. The_Name'Last)) then return; end if; diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi index 46f149721ee..fbaa3453727 100644 --- a/gcc/ada/projects.texi +++ b/gcc/ada/projects.texi @@ -2695,7 +2695,6 @@ project. Here is the (non exhaustive) list: @item Source_Files, Source_List_File and other attributes dealing with list of sources. @item Source_Dirs, Exec_Dir and Object_Dir -@item Library_Dir, Library_Name and other library-related attributes @item Main @item Roots @item Externally_Built |