On Windows, if a source with a file name that includes capital letter is
compiled with -gnatc, gnatmake will always recompile the file if invoked
again with -gnatc. This patch fixes this.
The test for this is to invoke several times gnatmake on Windows to
compile, with -gnatc, sources from a project with file names that
include capital letters. The sources should not be recompiled.
Tested on x86_64-pc-linux-gnu, committed on trunk
2011-08-04 Vincent Celier <[email protected]>
* make.adb (Check): When -gnatc is used, check for the source file
inside the ALI file with a canonical case file name.
Index: make.adb
===================================================================
--- make.adb (revision 177320)
+++ make.adb (working copy)
@@ -1622,10 +1622,14 @@
if Operating_Mode = Check_Semantics then
declare
- File_Name : constant String := Get_Name_String (Source_File);
+ File_Name : String := Get_Name_String (Source_File);
OK : Boolean := False;
begin
+ -- In the ALI file, the source file names are in canonical case
+
+ Canonical_Case_File_Name (File_Name);
+
for U in ALIs.Table (ALI).First_Unit ..
ALIs.Table (ALI).Last_Unit
loop