diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-27 14:27:17 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-27 14:27:17 +0000 |
commit | b3fb26fdfc0741364ca0f937e11b108825196ba9 (patch) | |
tree | 5db4ec8273f035a29e6c9504108dd9262b217b21 /gcc/ada/make.adb | |
parent | af2767316fb2f05d87f2b8bb6917b240ef1976fc (diff) | |
download | gcc-b3fb26fdfc0741364ca0f937e11b108825196ba9.tar.gz |
* Makefile.generic: Add missing substitution on object_deps handling.
PR ada/5909:
* Make-lang.in (check-ada): Enable ACATS test suite.
* exp_ch3.adb:
(Freeze_Array_Type): We do not need an initialization routine for types
derived from String or Wide_String. They should be treated the same
as String and Wide_String themselves. This caused problems with the
use of Initialize_Scalars.
* exp_ch5.adb:
(Expand_Assign_Record): Do component-wise assignment of non-byte aligned
composites. This allows use of component clauses that are not byte
aligned.
* sem_prag.adb:
(Analyze_Pragma, case Pack): Generate warning and ignore pack if there
is an attempt to pack an array of atomic objects.
* make.adb, prj-env.adb, prj-env.ads: Minor reformatting
* g-dirope.adb:
(Basename): Check for drive letters in a pathname only on DOS based OS.
* make.adb:
(Gnatmake): When unable to change dir to the object dir, display the
content of the parent dir of the obj dir, to try to understand why this
happens.
* Make-lang.in: Makefile automatically updated
* sem_ch12.adb:
(Inline_Instance_Body): Indicate that the save/restore of use_clauses
should not be done in Save/Restore_Scope_Stack, because it is performed
locally.
* sem_ch8.adb:
(Save_Scope_Stack, Restore_Scope_Stack): Add parameter to indicate
whether use clauses should be removed/restored.
* sem_ch8.ads:
(Save_Scope_Stack, Restore_Scope_Stack): Add parameter to indicate
whether use clauses should be removed/restored.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r-- | gcc/ada/make.adb | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 3ebec3d7d83..a82c99aff7f 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -3386,7 +3386,7 @@ package body Make is loop declare - Main : constant String := Mains.Next_Main; + Main : constant String := Mains.Next_Main; -- The name specified on the command line may include -- directory information. @@ -3416,7 +3416,7 @@ package body Make is if Main /= File_Name then declare Data : constant Project_Data := - Projects.Table (Main_Project); + Projects.Table (Main_Project); Project_Path : constant String := Prj.Env.File_Name_Of_Library_Unit_Body @@ -3478,12 +3478,14 @@ package body Make is 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. @@ -3557,11 +3559,14 @@ package body Make is declare Data : Project_Data := Projects.Table (Main_Project); + Languages : Variable_Value := - Prj.Util.Value_Of - (Name_Languages, Data.Decl.Attributes); + Prj.Util.Value_Of + (Name_Languages, Data.Decl.Attributes); + Current : String_List_Id; Element : String_Element; + Foreign_Language : Boolean := False; At_Least_One_Main : Boolean := False; @@ -3593,8 +3598,8 @@ package body Make is while Value /= Prj.Nil_String loop Get_Name_String (String_Elements.Table (Value).Value); - -- To know if a main is an Ada main, get its project; - -- it should be the project specified on the command + -- To know if a main is an Ada main, get its project. + -- It should be the project specified on the command -- line. if (not Foreign_Language) or else @@ -3616,6 +3621,7 @@ package body Make is -- we put all sources of the main project in the Q. if not At_Least_One_Main then + -- First make sure that the binder and the linker -- will not be invoked. @@ -3739,6 +3745,45 @@ package body Make is exception when Directory_Error => + + -- This should never happen. But, if it does, display the + -- content of the parent directory of the obj dir. + + declare + Parent : constant Dir_Name_Str := + Dir_Name + (Get_Name_String + (Projects.Table (Main_Project).Object_Directory)); + Dir : Dir_Type; + Str : String (1 .. 200); + Last : Natural; + + begin + Write_Str ("Contents of directory """); + Write_Str (Parent); + Write_Line (""":"); + + Open (Dir, Parent); + + loop + Read (Dir, Str, Last); + exit when Last = 0; + Write_Str (" "); + Write_Line (Str (1 .. Last)); + end loop; + + Close (Dir); + + exception + when X : others => + Write_Line ("(unexpected exception)"); + Write_Line (Exception_Information (X)); + + if Is_Open (Dir) then + Close (Dir); + end if; + end; + Make_Failed ("unable to change working directory to """, Get_Name_String (Projects.Table (Main_Project).Object_Directory), |