[Ada] Extending library projects with no sources does not build

Message ID 20110804131551.GA28691@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Aug. 4, 2011, 1:15 p.m.
If a library project extending another one has no sources of its own,
and there is an exception name with capital letters in the project
being extended, then on platform with case-insensitive file names
(such a Windows, Darwin or VMS), the invocation of gnatmake to build
the library will fail.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-04  Vincent Celier  <celier@adacore.com>

	* prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
	has Ada sources, not project Project, because if the root project
	Project has no sources of its own, all projects will be deemed without


Index: prj-env.adb
--- prj-env.adb	(revision 177367)
+++ prj-env.adb	(working copy)
@@ -1281,7 +1281,7 @@ 
          --  If there are Ada sources, call action with the name of every
          --  source directory.
-         if Has_Ada_Sources (Project) then
+         if Has_Ada_Sources (Prj) then
             while Current /= Nil_String loop
                The_String := In_Tree.Shared.String_Elements.Table (Current);
                Action (Get_Name_String (The_String.Display_Value));