[multiple changes]
2014-08-01 Robert Dewar <dewar@adacore.com> * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_res.adb: Minor reformatting. 2014-08-01 Vincent Celier <celier@adacore.com> * make.adb (Initialize): Set Keep_Temporary_Files to True when -dn is specified. * makeusg.adb: Add line for new switch --keep-temp-files. * makeutl.ads (Keep_Temp_Files_Option): New constant String. * opt.ads (Keep_Temporary_Files): Document that it is also used by gnatmake and gprbuild. * switch-m.adb: Recognize new switch --keep-temp-files. From-SVN: r213451
This commit is contained in:
parent
24de083ff5
commit
b330e3c866
|
@ -1,3 +1,18 @@
|
||||||
|
2014-08-01 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
|
||||||
|
sem_res.adb: Minor reformatting.
|
||||||
|
|
||||||
|
2014-08-01 Vincent Celier <celier@adacore.com>
|
||||||
|
|
||||||
|
* make.adb (Initialize): Set Keep_Temporary_Files to True when
|
||||||
|
-dn is specified.
|
||||||
|
* makeusg.adb: Add line for new switch --keep-temp-files.
|
||||||
|
* makeutl.ads (Keep_Temp_Files_Option): New constant String.
|
||||||
|
* opt.ads (Keep_Temporary_Files): Document that it is also used
|
||||||
|
by gnatmake and gprbuild.
|
||||||
|
* switch-m.adb: Recognize new switch --keep-temp-files.
|
||||||
|
|
||||||
2014-08-01 Tristan Gingold <gingold@adacore.com>
|
2014-08-01 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
|
* sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
|
||||||
|
|
|
@ -789,6 +789,7 @@ package body Debug is
|
||||||
|
|
||||||
-- dm Issue a message indicating the maximum number of simultaneous
|
-- dm Issue a message indicating the maximum number of simultaneous
|
||||||
-- compilations.
|
-- compilations.
|
||||||
|
-- Equivalent to --keep-temp-files.
|
||||||
|
|
||||||
-- dn Do not delete temporary files created by gnatmake at the end
|
-- dn Do not delete temporary files created by gnatmake at the end
|
||||||
-- of execution, such as temporary config pragma files, mapping
|
-- of execution, such as temporary config pragma files, mapping
|
||||||
|
@ -796,6 +797,7 @@ package body Debug is
|
||||||
|
|
||||||
-- dp Prints the Q used by routine Make.Compile_Sources every time
|
-- dp Prints the Q used by routine Make.Compile_Sources every time
|
||||||
-- we go around the main compile loop of Make.Compile_Sources
|
-- we go around the main compile loop of Make.Compile_Sources
|
||||||
|
-- Equivalent to --keep-temp-files.
|
||||||
|
|
||||||
-- dq Prints source files as they are enqueued and dequeued in the Q
|
-- dq Prints source files as they are enqueued and dequeued in the Q
|
||||||
-- used by routine Make.Compile_Sources. Useful to figure out the
|
-- used by routine Make.Compile_Sources. Useful to figure out the
|
||||||
|
|
|
@ -3788,7 +3788,7 @@ package body Make is
|
||||||
|
|
||||||
-- Delete any temporary configuration pragma file
|
-- Delete any temporary configuration pragma file
|
||||||
|
|
||||||
if not Debug.Debug_Flag_N then
|
if not Keep_Temporary_Files then
|
||||||
Delete_Temp_Config_Files (Project_Tree);
|
Delete_Temp_Config_Files (Project_Tree);
|
||||||
end if;
|
end if;
|
||||||
end Compile_Sources;
|
end Compile_Sources;
|
||||||
|
@ -3966,7 +3966,7 @@ package body Make is
|
||||||
-- created when using a project file.
|
-- created when using a project file.
|
||||||
|
|
||||||
if Main_Project = No_Project
|
if Main_Project = No_Project
|
||||||
or else Debug.Debug_Flag_N
|
or else Opt.Keep_Temporary_Files
|
||||||
or else Args (J)'Length < 8
|
or else Args (J)'Length < 8
|
||||||
or else
|
or else
|
||||||
Args (J) (Args (J)'First .. Args (J)'First + 6) /= "-gnatem"
|
Args (J) (Args (J)'First .. Args (J)'First + 6) /= "-gnatem"
|
||||||
|
@ -3977,7 +3977,7 @@ package body Make is
|
||||||
-- Reset Temporary_Config_File to False so that the eventual
|
-- Reset Temporary_Config_File to False so that the eventual
|
||||||
-- other -gnatec switches will be displayed.
|
-- other -gnatec switches will be displayed.
|
||||||
|
|
||||||
if (not Debug.Debug_Flag_N)
|
if (not Opt.Keep_Temporary_Files)
|
||||||
and then Temporary_Config_File
|
and then Temporary_Config_File
|
||||||
and then Args (J)'Length > 7
|
and then Args (J)'Length > 7
|
||||||
and then Args (J) (Args (J)'First .. Args (J)'First + 6)
|
and then Args (J) (Args (J)'First .. Args (J)'First + 6)
|
||||||
|
@ -3988,7 +3988,7 @@ package body Make is
|
||||||
-- Do not display the -F=mapping_file switch for gnatbind
|
-- Do not display the -F=mapping_file switch for gnatbind
|
||||||
-- if -dn is not specified.
|
-- if -dn is not specified.
|
||||||
|
|
||||||
elsif Debug.Debug_Flag_N
|
elsif Opt.Keep_Temporary_Files
|
||||||
or else Args (J)'Length < 4
|
or else Args (J)'Length < 4
|
||||||
or else
|
or else
|
||||||
Args (J) (Args (J)'First .. Args (J)'First + 2) /= "-F="
|
Args (J) (Args (J)'First .. Args (J)'First + 2) /= "-F="
|
||||||
|
@ -6650,6 +6650,9 @@ package body Make is
|
||||||
|
|
||||||
Project_Of_Current_Object_Directory := No_Project;
|
Project_Of_Current_Object_Directory := No_Project;
|
||||||
|
|
||||||
|
if Debug.Debug_Flag_N then
|
||||||
|
Opt.Keep_Temporary_Files := True;
|
||||||
|
end if;
|
||||||
end Initialize;
|
end Initialize;
|
||||||
|
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
|
@ -257,12 +257,6 @@ begin
|
||||||
Write_Eol;
|
Write_Eol;
|
||||||
Write_Eol;
|
Write_Eol;
|
||||||
|
|
||||||
-- Line for -dn
|
|
||||||
|
|
||||||
Write_Str (" -dn Do not delete temporary files");
|
|
||||||
Write_Eol;
|
|
||||||
Write_Eol;
|
|
||||||
|
|
||||||
Write_Str (" --create-map-file Create map file mainprog.map");
|
Write_Str (" --create-map-file Create map file mainprog.map");
|
||||||
Write_Eol;
|
Write_Eol;
|
||||||
|
|
||||||
|
@ -271,6 +265,9 @@ begin
|
||||||
Write_Str (" Create map file mapfile");
|
Write_Str (" Create map file mapfile");
|
||||||
Write_Eol;
|
Write_Eol;
|
||||||
|
|
||||||
|
Write_Str (" --keep-temp-files Keep temporary files");
|
||||||
|
Write_Eol;
|
||||||
|
|
||||||
Write_Str (" --GCC=command Use this gcc command");
|
Write_Str (" --GCC=command Use this gcc command");
|
||||||
Write_Eol;
|
Write_Eol;
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,10 @@ package Makeutl is
|
||||||
-- the builder and does not want to pollute its output with error messages
|
-- the builder and does not want to pollute its output with error messages
|
||||||
-- coming from the builder. This is an internal switch.
|
-- coming from the builder. This is an internal switch.
|
||||||
|
|
||||||
|
Keep_Temp_Files_Option : constant String := "--keep-temp-files";
|
||||||
|
-- Switch to suppress deletion of temp files created by the builder.
|
||||||
|
-- Equivallent of -dn.
|
||||||
|
|
||||||
Load_Standard_Base : Boolean := True;
|
Load_Standard_Base : Boolean := True;
|
||||||
-- False when gprbuild is called with --db-
|
-- False when gprbuild is called with --db-
|
||||||
|
|
||||||
|
|
|
@ -843,9 +843,9 @@ package Opt is
|
||||||
-- sources until there is no more work.
|
-- sources until there is no more work.
|
||||||
|
|
||||||
Keep_Temporary_Files : Boolean := False;
|
Keep_Temporary_Files : Boolean := False;
|
||||||
-- GNATCMD
|
-- GNATCMD, GNATMAKE, GPRBUILD
|
||||||
-- When True the temporary files created by the GNAT driver are not
|
-- When True the temporary files are not deleted. Set by switches -dn or
|
||||||
-- deleted. Set by switch -dn or qualifier /KEEP_TEMPORARY_FILES.
|
-- --keep-temp-files.
|
||||||
|
|
||||||
Leap_Seconds_Support : Boolean := False;
|
Leap_Seconds_Support : Boolean := False;
|
||||||
-- GNATBIND
|
-- GNATBIND
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
-- --
|
-- --
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
with Debug;
|
|
||||||
with Opt;
|
with Opt;
|
||||||
with Osint; use Osint;
|
with Osint; use Osint;
|
||||||
with Output; use Output;
|
with Output; use Output;
|
||||||
|
@ -187,7 +186,7 @@ package body Prj is
|
||||||
pragma Warnings (Off, Dont_Care);
|
pragma Warnings (Off, Dont_Care);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not Debug.Debug_Flag_N then
|
if not Opt.Keep_Temporary_Files then
|
||||||
if Current_Verbosity = High then
|
if Current_Verbosity = High then
|
||||||
Write_Line ("Removing temp file: " & Get_Name_String (Path));
|
Write_Line ("Removing temp file: " & Get_Name_String (Path));
|
||||||
end if;
|
end if;
|
||||||
|
@ -217,7 +216,7 @@ package body Prj is
|
||||||
Proj : Project_List;
|
Proj : Project_List;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not Debug.Debug_Flag_N then
|
if not Opt.Keep_Temporary_Files then
|
||||||
if Project_Tree /= null then
|
if Project_Tree /= null then
|
||||||
Proj := Project_Tree.Projects;
|
Proj := Project_Tree.Projects;
|
||||||
while Proj /= null loop
|
while Proj /= null loop
|
||||||
|
@ -254,7 +253,7 @@ package body Prj is
|
||||||
Path : Path_Name_Type;
|
Path : Path_Name_Type;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not Debug.Debug_Flag_N then
|
if not Opt.Keep_Temporary_Files then
|
||||||
for Index in
|
for Index in
|
||||||
1 .. Temp_Files_Table.Last (Shared.Private_Part.Temp_Files)
|
1 .. Temp_Files_Table.Last (Shared.Private_Part.Temp_Files)
|
||||||
loop
|
loop
|
||||||
|
|
|
@ -1728,12 +1728,14 @@ package body Sem_Aggr is
|
||||||
Freeze_Before (N, E);
|
Freeze_Before (N, E);
|
||||||
|
|
||||||
if Has_Dynamic_Predicate_Aspect (E) then
|
if Has_Dynamic_Predicate_Aspect (E) then
|
||||||
Error_Msg_NE ("subtype& has dynamic predicate,"
|
Error_Msg_NE
|
||||||
& "not allowed in aggregate choice", Choice, E);
|
("subtype& has dynamic predicate, not allowed "
|
||||||
|
& "in aggregate choice", Choice, E);
|
||||||
|
|
||||||
elsif not Is_Static_Subtype (E) then
|
elsif not Is_Static_Subtype (E) then
|
||||||
Error_Msg_NE ("non-static subtype& has predicate,"
|
Error_Msg_NE
|
||||||
& "not allowed in aggregate choice", Choice, E);
|
("non-static subtype& has predicate, not allowed "
|
||||||
|
& "in aggregate choice", Choice, E);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- If the subtype has a static predicate, replace the
|
-- If the subtype has a static predicate, replace the
|
||||||
|
|
|
@ -2923,7 +2923,7 @@ package body Sem_Ch3 is
|
||||||
if Has_Dynamic_Predicate_Aspect (T) then
|
if Has_Dynamic_Predicate_Aspect (T) then
|
||||||
Error_Msg_N
|
Error_Msg_N
|
||||||
("subtype has dynamic predicate, "
|
("subtype has dynamic predicate, "
|
||||||
& "not allowed in number declaration", N);
|
& "not allowed in number declaration", N);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
@ -2210,9 +2210,9 @@ package body Sem_Ch5 is
|
||||||
or else Has_Dynamic_Predicate_Aspect (T))
|
or else Has_Dynamic_Predicate_Aspect (T))
|
||||||
then
|
then
|
||||||
Bad_Predicated_Subtype_Use
|
Bad_Predicated_Subtype_Use
|
||||||
("cannot use subtype& with non-static predicate for loop " &
|
("cannot use subtype& with non-static predicate for loop "
|
||||||
"iteration", Discrete_Subtype_Definition (N),
|
& "iteration", Discrete_Subtype_Definition (N),
|
||||||
T, Suggest_Static => True);
|
T, Suggest_Static => True);
|
||||||
|
|
||||||
elsif Inside_A_Generic and then Is_Generic_Formal (T) then
|
elsif Inside_A_Generic and then Is_Generic_Formal (T) then
|
||||||
Set_No_Dynamic_Predicate_On_Actual (T);
|
Set_No_Dynamic_Predicate_On_Actual (T);
|
||||||
|
|
|
@ -9819,10 +9819,9 @@ package body Sem_Res is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Nkind (Drange) = N_Subtype_Indication
|
if Nkind (Drange) = N_Subtype_Indication
|
||||||
and then Has_Predicates (Entity (Subtype_Mark (Drange)))
|
and then Has_Predicates (Entity (Subtype_Mark (Drange)))
|
||||||
then
|
then
|
||||||
Subt := Entity (Subtype_Mark (Drange));
|
Subt := Entity (Subtype_Mark (Drange));
|
||||||
|
|
||||||
else
|
else
|
||||||
Subt := Etype (Drange);
|
Subt := Etype (Drange);
|
||||||
end if;
|
end if;
|
||||||
|
|
|
@ -784,7 +784,6 @@ package body Sem_Util is
|
||||||
Gen : Entity_Id;
|
Gen : Entity_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
-- Avoid cascaded errors
|
-- Avoid cascaded errors
|
||||||
|
|
||||||
if Error_Posted (N) then
|
if Error_Posted (N) then
|
||||||
|
|
|
@ -793,6 +793,9 @@ package body Switch.M is
|
||||||
elsif Switch_Chars = Makeutl.No_Exit_Message_Option then
|
elsif Switch_Chars = Makeutl.No_Exit_Message_Option then
|
||||||
Opt.No_Exit_Message := True;
|
Opt.No_Exit_Message := True;
|
||||||
|
|
||||||
|
elsif Switch_Chars = Makeutl.Keep_Temp_Files_Option then
|
||||||
|
Opt.Keep_Temporary_Files := True;
|
||||||
|
|
||||||
elsif Switch_Chars (Ptr) = '-' then
|
elsif Switch_Chars (Ptr) = '-' then
|
||||||
Bad_Switch (Switch_Chars);
|
Bad_Switch (Switch_Chars);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue