aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2007-09-26 12:44:35 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-09-26 12:44:35 +0200
commita338b0e34936f88d8a87d53610eb63cae6bcd20e (patch)
tree89eef6c46fe49d349d87c4826da137e74b55c8c3 /gcc/ada/gnatcmd.adb
parent226302378ab388a063589e070715a0032b6c56f6 (diff)
downloadgcc-a338b0e34936f88d8a87d53610eb63cae6bcd20e.zip
gcc-a338b0e34936f88d8a87d53610eb63cae6bcd20e.tar.gz
gcc-a338b0e34936f88d8a87d53610eb63cae6bcd20e.tar.bz2
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
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb21
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 291d6aa..7ffc558 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -394,6 +394,8 @@ procedure GNATCmd is
if The_Command = List then
if
Unit_Data.File_Names (Body_Part).Name /= No_File
+ and then
+ Unit_Data.File_Names (Body_Part).Path /= Slash
then
-- There is a body, check if it is for this project
@@ -404,6 +406,8 @@ procedure GNATCmd is
if
Unit_Data.File_Names (Specification).Name = No_File
+ or else
+ Unit_Data.File_Names (Specification).Path = Slash
then
-- We have a body with no spec: we need to check if
-- this is a subunit, because gnatls will complain
@@ -436,6 +440,8 @@ procedure GNATCmd is
elsif
Unit_Data.File_Names (Specification).Name /= No_File
+ and then
+ Unit_Data.File_Names (Specification).Path /= Slash
then
-- We have a spec with no body; check if it is for this
-- project.
@@ -460,6 +466,8 @@ procedure GNATCmd is
elsif The_Command = Stack then
if
Unit_Data.File_Names (Body_Part).Name /= No_File
+ and then
+ Unit_Data.File_Names (Body_Part).Path /= Slash
then
-- There is a body. Check if .ci files for this project
-- must be added.
@@ -472,6 +480,8 @@ procedure GNATCmd is
if
Unit_Data.File_Names (Specification).Name = No_File
+ or else
+ Unit_Data.File_Names (Specification).Path = Slash
then
-- We have a body with no spec: we need to check
-- if this is a subunit, because .ci files are not
@@ -510,6 +520,8 @@ procedure GNATCmd is
elsif
Unit_Data.File_Names (Specification).Name /= No_File
+ and then
+ Unit_Data.File_Names (Specification).Path /= Slash
then
-- We have a spec with no body. Check if it is for this
-- project.
@@ -541,18 +553,17 @@ procedure GNATCmd is
-- of the project, or of all projects if -U was specified.
for Kind in Spec_Or_Body loop
-
- -- Put only sources that belong to the main project
-
if Check_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
Last_Switches.Increment_Last;
Last_Switches.Table (Last_Switches.Last) :=
new String'
(Get_Name_String
- (Unit_Data.File_Names
- (Kind).Display_Path));
+ (Unit_Data.File_Names
+ (Kind).Display_Path));
end if;
end loop;
end if;