Commit c98b8253 by Arnaud Charlet

[multiple changes]

2014-07-30  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb, sem_ch3.ads: Minor code reorganization.

2014-07-30  Pascal Obry  <obry@adacore.com>

	* clean.adb (Clean_Project): Properly check for directory
	existence before trying to enter it.

From-SVN: r213284
parent 2e471ec7
2014-07-30 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
2014-07-30 Pascal Obry <obry@adacore.com>
* clean.adb (Clean_Project): Properly check for directory
existence before trying to enter it.
2014-07-30 Robert Dewar <dewar@adacore.com>
* sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
2014-07-30 Robert Dewar <dewar@adacore.com>
......
......@@ -666,12 +666,13 @@ package body Clean is
Canonical_Case_File_Name (Archive_Name);
Canonical_Case_File_Name (DLL_Name);
if Is_Directory (Lib_Directory) then
Change_Dir (Lib_Directory);
Open (Direc, ".");
-- For each regular file in the directory, if switch -n has not
-- been specified, make it writable and delete the file if it is
-- the library file.
-- not been specified, make it writable and delete the file if
-- it is the library file.
loop
Read (Direc, Name, Last);
......@@ -711,6 +712,12 @@ package body Clean is
end loop;
Close (Direc);
end if;
if not Is_Directory (Lib_ALI_Directory) then
-- Nothing more to do, return now
return;
end if;
Change_Dir (Lib_ALI_Directory);
Open (Direc, ".");
......@@ -860,7 +867,10 @@ package body Clean is
Processed_Projects.Increment_Last;
Processed_Projects.Table (Processed_Projects.Last) := Project;
if Project.Object_Directory /= No_Path_Information then
if Project.Object_Directory /= No_Path_Information
and then Is_Directory
(Get_Name_String (Project.Object_Directory.Display_Name))
then
declare
Obj_Dir : constant String :=
Get_Name_String (Project.Object_Directory.Display_Name);
......@@ -1188,7 +1198,10 @@ package body Clean is
end;
end if;
if Project.Object_Directory /= No_Path_Information then
if Project.Object_Directory /= No_Path_Information
and then Is_Directory
(Get_Name_String (Project.Object_Directory.Display_Name))
then
Delete_Binder_Generated_Files
(Get_Name_String (Project.Object_Directory.Display_Name),
Strip_Suffix (Main_Source_File));
......
......@@ -193,7 +193,7 @@ package Sem_Ch3 is
-- C is automatically visible.
procedure Make_Index
(I : Node_Id;
(N : Node_Id;
Related_Nod : Node_Id;
Related_Id : Entity_Id := Empty;
Suffix_Index : Nat := 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment