This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] gnatmake find old ALI files in wrong object directory


When gnatmake is invoked with project files and a source has been moved
from one project A to another project B in the project tree, but the ALI
and object files has not be removed from the object directory of A,
gnatmake may always recompile the source moved to project B, even when it
is up to date. This patch is fixing this.

The test is to have 3 projects: Prj that withs A that withs B.
The object directories of the 3 projects are different.
A package Pkg in project A is used by the main in Prj. Invoke gnatmake to
build the main in Prj. Move package Pkg from project A to project B,
without removing the ALI and object files in the object directory of A.
Invoke gnatmake to build the main in Prj. Invoke again gnatmake to build
the main in Prj: gnatmake should report that everything is up to date.

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

2013-01-29  Vincent Celier  <celier@adacore.com>

	* clean.adb (Clean_Executables): Add Sid component when calling
	Queue.Insert.
	* make.adb: When inserting in the Queue, add the Source_Id
	(Sid) when it is known (Start_Compile_If_Possible): When the
	Source_Id is known (Sid), get the path name of the ALI file
	(Full_Lib_File) from it, to avoid finding old ALI files in other
	object directories.
	* makeutl.ads (Source_Info): New Source_Id component Sid in
	Format_Gnatmake variant.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]