aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/make.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 12:50:14 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 12:50:14 +0200
commit0187b60e160e72673f1116a215ca257e11ba3903 (patch)
treef59ec3e7f6d6ce26c1e709b66654bfafc93b35d5 /gcc/ada/make.adb
parente0b23d9fd37bfef08ad71836438ba88446ecb5b7 (diff)
downloadgcc-0187b60e160e72673f1116a215ca257e11ba3903.zip
gcc-0187b60e160e72673f1116a215ca257e11ba3903.tar.gz
gcc-0187b60e160e72673f1116a215ca257e11ba3903.tar.bz2
[multiple changes]
2011-08-03 Gary Dismukes <dismukes@adacore.com> * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip conforming subprogram renamings that appear to be completions if they are not fully conformant. Such renamings are homographs but not completions. * sem_type.adb (Disambiguate): Handle disambiguation of overloaded names in a subprogram renaming that appears in an instance. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but not immutably limited, build actual subtype from expression to provide proper bounds to caller. 2011-08-03 Gary Dismukes <dismukes@adacore.com> * sem_ch8.adb: Minor comment correction. 2011-08-03 Thomas Quinot <quinot@adacore.com> * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when returning a limited array, use an extended return statement. 2011-08-03 Vincent Celier <celier@adacore.com> * make.adb (Initialize): If --subdirs= is used, but no project file is specified, attempt to create the specify subdir if it does not already exist and use it as the object directory as if -D had been specified. 2011-08-03 Arnaud Charlet <charlet@adacore.com> * s-tpopsp-vms.adb: New file. * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS. * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS. From-SVN: r177266
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r--gcc/ada/make.adb43
1 files changed, 40 insertions, 3 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index a61728e..0eca008 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -61,17 +61,18 @@ pragma Warnings (On);
with Switch; use Switch;
with Switch.M; use Switch.M;
-with Targparm; use Targparm;
with Table;
+with Targparm; use Targparm;
with Tempdir;
with Types; use Types;
-with Ada.Exceptions; use Ada.Exceptions;
with Ada.Command_Line; use Ada.Command_Line;
+with Ada.Directories;
+with Ada.Exceptions; use Ada.Exceptions;
+with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.Dynamic_HTables; use GNAT.Dynamic_HTables;
-with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.OS_Lib; use GNAT.OS_Lib;
package body Make is
@@ -5898,6 +5899,10 @@ package body Make is
Prj.Env.Set_Ada_Paths
(Main_Project, Project_Tree, Use_Include_Path_File);
+ -- (Project => Main_Project,
+ -- In_Tree => Project_Tree,
+ -- Including_Libraries => True,
+ -- Include_Path => Use_Include_Path_File);
-- If switch -C was specified, create a binder mapping file
@@ -6729,6 +6734,38 @@ package body Make is
Make_Failed ("-i and -D cannot be used simultaneously");
end if;
+ -- If --subdirs= is specified, but not -P, this is equivalent to -D,
+ -- except that the directory is created if it does not exist.
+
+ if Prj.Subdirs /= null and then Project_File_Name = null then
+ if Object_Directory_Path /= null then
+ Make_Failed ("--subdirs and -D cannot be used simultaneously");
+
+ elsif In_Place_Mode then
+ Make_Failed ("--subdirs and -i cannot be used simultaneously");
+
+ else
+ if not Is_Directory (Prj.Subdirs.all) then
+ begin
+ Ada.Directories.Create_Path (Prj.Subdirs.all);
+ exception
+ when others =>
+ Make_Failed ("unable to create object directory " &
+ Prj.Subdirs.all);
+ end;
+ end if;
+
+ Object_Directory_Present := True;
+
+ declare
+ Argv : constant String (1 .. Prj.Subdirs'Length) :=
+ Prj.Subdirs.all;
+ begin
+ Scan_Make_Arg (Env, Argv, And_Save => False);
+ end;
+ end if;
+ end if;
+
-- Deal with -C= switch
if Gnatmake_Mapping_File /= null then