Commit 69b73847 by Pascal Obry Committed by Arnaud Charlet

prj-nmsc.adb: Minor reformatting.

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.

From-SVN: r178546
parent 4e5bc135
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> 2011-09-05 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Minor reformatting. * sem_ch6.adb: Minor reformatting.
......
...@@ -2717,8 +2717,8 @@ package body Prj.Nmsc is ...@@ -2717,8 +2717,8 @@ package body Prj.Nmsc is
Source := Prj.Element (Iter); Source := Prj.Element (Iter);
exit when Source = No_Source; exit when Source = No_Source;
if Source.Unit /= No_Unit_Index and then if Source.Unit /= No_Unit_Index
Source.Unit.Name = Name_Id (Name) and then Source.Unit.Name = Name_Id (Name)
then then
if not Source.Locally_Removed then if not Source.Locally_Removed then
Source.In_Interfaces := True; Source.In_Interfaces := True;
...@@ -2870,8 +2870,8 @@ package body Prj.Nmsc is ...@@ -2870,8 +2870,8 @@ package body Prj.Nmsc is
end if; end if;
end if; end if;
elsif Project.Library_Kind /= Static and then elsif Project.Library_Kind /= Static
Proj.Library_Kind = Static and then Proj.Library_Kind = Static
then then
Error_Msg_Name_1 := Project.Name; Error_Msg_Name_1 := Project.Name;
Error_Msg_Name_2 := Proj.Name; Error_Msg_Name_2 := Proj.Name;
...@@ -3193,8 +3193,8 @@ package body Prj.Nmsc is ...@@ -3193,8 +3193,8 @@ package body Prj.Nmsc is
Lib_ALI_Dir.Location, Project); Lib_ALI_Dir.Location, Project);
end if; end if;
if (not Project.Externally_Built) and then if not Project.Externally_Built
Project.Library_ALI_Dir /= Project.Library_Dir and then Project.Library_ALI_Dir /= Project.Library_Dir
then then
-- The library ALI directory cannot be the same as the -- The library ALI directory cannot be the same as the
-- Object directory. -- Object directory.
...@@ -4435,7 +4435,18 @@ package body Prj.Nmsc is ...@@ -4435,7 +4435,18 @@ package body Prj.Nmsc is
Error_Msg_Name_1 := Unit; Error_Msg_Name_1 := Unit;
Next_Proj := Project.Extends; 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 loop
while Prj.Element (Iter) /= No_Source while Prj.Element (Iter) /= No_Source
and then and then
...@@ -4467,6 +4478,7 @@ package body Prj.Nmsc is ...@@ -4467,6 +4478,7 @@ package body Prj.Nmsc is
if Source /= No_Source then if Source /= No_Source then
if Source.Project /= Project if Source.Project /= Project
and then not Is_Extending (Project, Source.Project) and then not Is_Extending (Project, Source.Project)
and then Project.Qualifier /= Aggregate_Library
then then
Source := No_Source; Source := No_Source;
end if; end if;
...@@ -4952,10 +4964,10 @@ package body Prj.Nmsc is ...@@ -4952,10 +4964,10 @@ package body Prj.Nmsc is
and then Name_Len > 3 and then Name_Len > 3
and then Name_Buffer (2 .. 3) = "__" and then Name_Buffer (2 .. 3) = "__"
and then and then
((Name_Buffer (1) = 'a') or else (Name_Buffer (1) = 'a' or else
(Name_Buffer (1) = 'g') or else Name_Buffer (1) = 'g' or else
(Name_Buffer (1) = 'i') or else Name_Buffer (1) = 'i' or else
(Name_Buffer (1) = 's')) Name_Buffer (1) = 's')
then then
Name_Buffer (2) := '.'; Name_Buffer (2) := '.';
Name_Buffer (3 .. Name_Len - 1) := Name_Buffer (4 .. Name_Len); Name_Buffer (3 .. Name_Len - 1) := Name_Buffer (4 .. Name_Len);
...@@ -5054,8 +5066,8 @@ package body Prj.Nmsc is ...@@ -5054,8 +5066,8 @@ package body Prj.Nmsc is
OK := OK and then not Need_Letter and then not Last_Underscore; OK := OK and then not Need_Letter and then not Last_Underscore;
if OK then if OK then
if First /= Name'First and then if First /= Name'First
Is_Reserved (The_Name (First .. The_Name'Last)) and then Is_Reserved (The_Name (First .. The_Name'Last))
then then
return; return;
end if; end if;
......
...@@ -2695,7 +2695,6 @@ project. Here is the (non exhaustive) list: ...@@ -2695,7 +2695,6 @@ project. Here is the (non exhaustive) list:
@item Source_Files, Source_List_File and other attributes dealing with @item Source_Files, Source_List_File and other attributes dealing with
list of sources. list of sources.
@item Source_Dirs, Exec_Dir and Object_Dir @item Source_Dirs, Exec_Dir and Object_Dir
@item Library_Dir, Library_Name and other library-related attributes
@item Main @item Main
@item Roots @item Roots
@item Externally_Built @item Externally_Built
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment