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] Recompile when a dependency has been replaced with another file name


When a source in a project being extended has been replaced by a source
with a different file name in the extending project, other sources that
depend on the replaced source file need to be recompiled. This patch
ensures that they are.
No simple test.

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

2010-10-07  Vincent Celier  <celier@adacore.com>

	* make.adb (Check): Call Check_Source_Info_In_ALI with Project_Tree
	* makeutl.adb (Check_Source_Info_In_ALI): If there is at least one
	replaced source, check that none of the replaced sources are in the
	dependencies.
	* makeutl.ads (Check_Source_Info_In_ALI): New parameter Tree
	* prj-nmsc.adb (Remove_Source): New parameter Tree. If the source is
	replaced with a source with a different file name, put it in the hash
	table Replaced_Sources.
	(Add_Source): Call Remove_Source with Data.Tree. If there is at least
	one replaced source, check if it has the same file name as the current
	source; if it has, remove it from the hash table Replaced_Sources.
	* prj.adb (Reset): Reset hash table Tree.Replaced_Sources
	* prj.ads (Replaced_Source_HTable): New hash table
	(Project_Tree_Data): New components Replaced_Sources and
	Replaced_Source_Number.

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]