summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-29 15:36:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-29 15:36:37 +0000
commite765e30947c08d469ce27fa93078bb8676c41718 (patch)
treec8797cf22d659bfb642c674053662622d6e7965a
parentc1caede59e78d9887330ed00c9083504781d2201 (diff)
downloadgcc-e765e30947c08d469ce27fa93078bb8676c41718.tar.gz
2014-01-29 Vincent Celier <celier@adacore.com>
* clean.adb (Gnatclean): Fail if main project is an aggregate project or if there is an aggregate library project in the project tree. * gnatcmd.adb: Fail if the main project is an aggregate project or if there is an aggegate library project in the project tree. * make.adb (Initialize): : Fail if main project is an aggregate project or if there is an aggregate library project in the project tree. * makeutl.ads (Aggregate_Libraries_In): New Boolean function. * prj-makr.adb (Initialize): Fail if the main project is an aggregate project or an aggregate library project. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207255 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/clean.adb6
-rw-r--r--gcc/ada/gnatcmd.adb6
-rw-r--r--gcc/ada/make.adb7
-rw-r--r--gcc/ada/makeutl.adb20
-rw-r--r--gcc/ada/makeutl.ads6
-rw-r--r--gcc/ada/prj-makr.adb8
7 files changed, 66 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 24d4801f856..57624ead7c1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,19 @@
2014-01-29 Vincent Celier <celier@adacore.com>
+ * clean.adb (Gnatclean): Fail if main project is an aggregate
+ project or if there is an aggregate library project in the
+ project tree.
+ * gnatcmd.adb: Fail if the main project is an aggregate project
+ or if there is an aggegate library project in the project tree.
+ * make.adb (Initialize): : Fail if main project is an aggregate
+ project or if there is an aggregate library project in the
+ project tree.
+ * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
+ * prj-makr.adb (Initialize): Fail if the main project is an
+ aggregate project or an aggregate library project.
+
+2014-01-29 Vincent Celier <celier@adacore.com>
+
* prj-part.adb (Check_Import_Aggregate): New procedure
to check if an imported project is an aggregate project.
(Parse_Single_Project): Call Check_Import_Aggregate
diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb
index cbaaa61c7d0..83e81cbe840 100644
--- a/gcc/ada/clean.adb
+++ b/gcc/ada/clean.adb
@@ -1416,6 +1416,12 @@ package body Clean is
if Main_Project = No_Project then
Fail ("""" & Project_File_Name.all & """ processing failed");
+
+ elsif Main_Project.Qualifier = Aggregate then
+ Fail ("aggregate projects are not supported");
+
+ elsif Aggregate_Libraries_In (Project_Tree) then
+ Fail ("aggregate library projects are not supported");
end if;
if Opt.Verbose_Mode then
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index d879cb7813a..1bca7d80f46 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -1939,6 +1939,12 @@ begin
if Project = Prj.No_Project then
Fail ("""" & Project_File.all & """ processing failed");
+
+ elsif Project.Qualifier = Aggregate then
+ Fail ("aggregate projects are not supported");
+
+ elsif Aggregate_Libraries_In (Project_Tree) then
+ Fail ("aggregate library projects are not supported");
end if;
-- Check if a package with the name of the tool is in the project
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index c8c605313e1..5078f0e1163 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -6617,6 +6617,13 @@ package body Make is
("""" & Project_File_Name.all & """ processing failed");
end if;
+ if Main_Project.Qualifier = Aggregate then
+ Make_Failed ("aggregate projects are not supported");
+
+ elsif Aggregate_Libraries_In (Project_Tree) then
+ Make_Failed ("aggregate library projects are not supported");
+ end if;
+
Create_Mapping_File := True;
if Verbose_Mode then
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index c5469315085..a220cbec0e2 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -171,6 +171,26 @@ package body Makeutl is
end;
end Absolute_Path;
+ ----------------------------
+ -- Aggregate_Libraries_In --
+ ----------------------------
+
+ function Aggregate_Libraries_In (Tree : Project_Tree_Ref) return Boolean is
+ List : Project_List;
+
+ begin
+ List := Tree.Projects;
+ while List /= null loop
+ if List.Project.Qualifier = Aggregate_Library then
+ return True;
+ end if;
+
+ List := List.Next;
+ end loop;
+
+ return False;
+ end Aggregate_Libraries_In;
+
-------------------------
-- Base_Name_Index_For --
-------------------------
diff --git a/gcc/ada/makeutl.ads b/gcc/ada/makeutl.ads
index e5f430440ec..88c9c988cbe 100644
--- a/gcc/ada/makeutl.ads
+++ b/gcc/ada/makeutl.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -216,6 +216,10 @@ package Makeutl is
-- The source directories of imported projects are only included if one
-- of the declared languages is in the list Languages.
+ function Aggregate_Libraries_In (Tree : Project_Tree_Ref) return Boolean;
+ -- Return True iff there is one or more aggregate library projects in
+ -- the project tree Tree.
+
procedure Write_Path_File (FD : File_Descriptor);
-- Write in the specified open path file the directories in table
-- Directories, then closed the path file.
diff --git a/gcc/ada/prj-makr.adb b/gcc/ada/prj-makr.adb
index 7de436943f5..f6d71f46b90 100644
--- a/gcc/ada/prj-makr.adb
+++ b/gcc/ada/prj-makr.adb
@@ -889,6 +889,14 @@ package body Prj.Makr is
if No (Project_Node) then
Prj.Com.Fail ("parsing of existing project file failed");
+ elsif Project_Qualifier_Of (Project_Node, Tree) = Aggregate then
+ Prj.Com.Fail ("aggregate projects are not supported");
+
+ elsif Project_Qualifier_Of (Project_Node, Tree) =
+ Aggregate_Library
+ then
+ Prj.Com.Fail ("aggregate library projects are not supported");
+
else
-- If parsing was successful, remove the components that are
-- automatically generated, if any, so that they will be