Commit a338b0e3 by Vincent Celier Committed by Arnaud Charlet

gnatcmd.adb (Check_Files): Do not include sources that have been removed by attributes...

2007-09-26  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (Check_Files): Do not include sources that have been
	removed by attributes Exclude_Source_Files or Locally_Removed_Files.

From-SVN: r128794
parent 22630237
...@@ -394,6 +394,8 @@ procedure GNATCmd is ...@@ -394,6 +394,8 @@ procedure GNATCmd is
if The_Command = List then if The_Command = List then
if if
Unit_Data.File_Names (Body_Part).Name /= No_File Unit_Data.File_Names (Body_Part).Name /= No_File
and then
Unit_Data.File_Names (Body_Part).Path /= Slash
then then
-- There is a body, check if it is for this project -- There is a body, check if it is for this project
...@@ -404,6 +406,8 @@ procedure GNATCmd is ...@@ -404,6 +406,8 @@ procedure GNATCmd is
if if
Unit_Data.File_Names (Specification).Name = No_File Unit_Data.File_Names (Specification).Name = No_File
or else
Unit_Data.File_Names (Specification).Path = Slash
then then
-- We have a body with no spec: we need to check if -- We have a body with no spec: we need to check if
-- this is a subunit, because gnatls will complain -- this is a subunit, because gnatls will complain
...@@ -436,6 +440,8 @@ procedure GNATCmd is ...@@ -436,6 +440,8 @@ procedure GNATCmd is
elsif elsif
Unit_Data.File_Names (Specification).Name /= No_File Unit_Data.File_Names (Specification).Name /= No_File
and then
Unit_Data.File_Names (Specification).Path /= Slash
then then
-- We have a spec with no body; check if it is for this -- We have a spec with no body; check if it is for this
-- project. -- project.
...@@ -460,6 +466,8 @@ procedure GNATCmd is ...@@ -460,6 +466,8 @@ procedure GNATCmd is
elsif The_Command = Stack then elsif The_Command = Stack then
if if
Unit_Data.File_Names (Body_Part).Name /= No_File Unit_Data.File_Names (Body_Part).Name /= No_File
and then
Unit_Data.File_Names (Body_Part).Path /= Slash
then then
-- There is a body. Check if .ci files for this project -- There is a body. Check if .ci files for this project
-- must be added. -- must be added.
...@@ -472,6 +480,8 @@ procedure GNATCmd is ...@@ -472,6 +480,8 @@ procedure GNATCmd is
if if
Unit_Data.File_Names (Specification).Name = No_File Unit_Data.File_Names (Specification).Name = No_File
or else
Unit_Data.File_Names (Specification).Path = Slash
then then
-- We have a body with no spec: we need to check -- We have a body with no spec: we need to check
-- if this is a subunit, because .ci files are not -- if this is a subunit, because .ci files are not
...@@ -510,6 +520,8 @@ procedure GNATCmd is ...@@ -510,6 +520,8 @@ procedure GNATCmd is
elsif elsif
Unit_Data.File_Names (Specification).Name /= No_File Unit_Data.File_Names (Specification).Name /= No_File
and then
Unit_Data.File_Names (Specification).Path /= Slash
then then
-- We have a spec with no body. Check if it is for this -- We have a spec with no body. Check if it is for this
-- project. -- project.
...@@ -541,18 +553,17 @@ procedure GNATCmd is ...@@ -541,18 +553,17 @@ procedure GNATCmd is
-- of the project, or of all projects if -U was specified. -- of the project, or of all projects if -U was specified.
for Kind in Spec_Or_Body loop for Kind in Spec_Or_Body loop
-- Put only sources that belong to the main project
if Check_Project if Check_Project
(Unit_Data.File_Names (Kind).Project, Project) (Unit_Data.File_Names (Kind).Project, Project)
and then Unit_Data.File_Names (Kind).Name /= No_File
and then Unit_Data.File_Names (Kind).Path /= Slash
then then
Last_Switches.Increment_Last; Last_Switches.Increment_Last;
Last_Switches.Table (Last_Switches.Last) := Last_Switches.Table (Last_Switches.Last) :=
new String' new String'
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Kind).Display_Path)); (Kind).Display_Path));
end if; end if;
end loop; end loop;
end if; end if;
......
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