summaryrefslogtreecommitdiff
path: root/gcc/ada/make.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 12:03:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 12:03:56 +0000
commitb5a75cb0da28b188b47880ac90cba7a03f20f4c9 (patch)
tree67bc0a95fb4ee296e2986bfa258a91ec98ff3dc9 /gcc/ada/make.adb
parentc91c62d4923b927622091fdce131127fb1140867 (diff)
downloadgcc-b5a75cb0da28b188b47880ac90cba7a03f20f4c9.tar.gz
2011-08-04 Emmanuel Briot <briot@adacore.com>
* make.adb, makeutl.adb (Complete_Mains): if a main specified on the command line is not a file name, also check whether it could be a unit name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177362 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r--gcc/ada/make.adb137
1 files changed, 0 insertions, 137 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index c0129c332c7..6b485f08cca 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -4151,143 +4151,6 @@ package body Make is
Mains.Complete_Mains
(Root_Environment.Flags, Main_Project, Project_Tree);
---
---
--- Real_Main_Project : Project_Id := No_Project;
--- -- The project of the first main
---
--- Proj : Project_Id := No_Project;
--- -- The project of the current main
---
--- Real_Path : String_Access;
---
--- begin
--- Mains.Reset;
---
--- -- Check each main
---
--- loop
--- declare
--- Main : constant String := Mains.Next_Main;
--- -- The name specified on the command line may include directory
--- -- information.
---
--- File_Name : constant String := Base_Name (Main);
--- -- The simple file name of the current main
---
--- Lang : Language_Ptr;
---
--- begin
--- exit when Main = "";
---
--- -- Get the project of the current main
---
--- Proj := Prj.Env.Project_Of
--- (File_Name, Main_Project, Project_Tree);
---
--- -- Fail if the current main is not a source of a project
---
--- if Proj = No_Project then
--- Make_Failed
--- ("""" & Main & """ is not a source of any project");
---
--- else
--- -- If there is directory information, check that the source
--- -- exists and, if it does, that the path is the actual path
--- -- of a source of a project.
---
--- if Main /= File_Name then
--- Lang := Get_Language_From_Name (Main_Project, "ada");
---
--- Real_Path :=
--- Locate_Regular_File
--- (Main & Get_Name_String
--- (Lang.Config.Naming_Data.Body_Suffix),
--- "");
--- if Real_Path = null then
--- Real_Path :=
--- Locate_Regular_File
--- (Main & Get_Name_String
--- (Lang.Config.Naming_Data.Spec_Suffix),
--- "");
--- end if;
---
--- if Real_Path = null then
--- Real_Path := Locate_Regular_File (Main, "");
--- end if;
---
--- -- Fail if the file cannot be found
---
--- if Real_Path = null then
--- Make_Failed ("file """ & Main & """ does not exist");
--- end if;
---
--- declare
--- Project_Path : constant String :=
--- Prj.Env.File_Name_Of_Library_Unit_Body
--- (Name => File_Name,
--- Project => Main_Project,
--- In_Tree => Project_Tree,
--- Main_Project_Only => False,
--- Full_Path => True);
--- Normed_Path : constant String :=
--- Normalize_Pathname
--- (Real_Path.all,
--- Case_Sensitive => False);
--- Proj_Path : constant String :=
--- Normalize_Pathname
--- (Project_Path,
--- Case_Sensitive => False);
---
--- begin
--- Free (Real_Path);
---
--- -- Fail if it is not the correct path
---
--- if Normed_Path /= Proj_Path then
--- if Verbose_Mode then
--- Set_Standard_Error;
--- Write_Str (Normed_Path);
--- Write_Str (" /= ");
--- Write_Line (Proj_Path);
--- end if;
---
--- Make_Failed
--- ("""" & Main &
--- """ is not a source of any project");
--- end if;
--- end;
--- end if;
---
--- if not Unique_Compile then
---
--- -- Record the project, if it is the first main
---
--- if Real_Main_Project = No_Project then
--- Real_Main_Project := Proj;
---
--- elsif Proj /= Real_Main_Project then
---
--- -- Fail, as the current main is not a source of the
--- -- same project as the first main.
---
--- Make_Failed
--- ("""" & Main &
--- """ is not a source of project " &
--- Get_Name_String (Real_Main_Project.Name));
--- end if;
--- end if;
--- end if;
---
--- -- If -u and -U are not used, we may have mains that are
--- -- sources of a project that is not the one specified with
--- -- switch -P.
---
--- if not Unique_Compile then
--- Main_Project := Real_Main_Project;
--- end if;
--- end;
--- end loop;
end Check_Mains;
-- Start of processing for Gnatmake