debug.adb: Remove doc for gnatmake/gprbuild switch -ds.

2014-08-01  Vincent Celier  <celier@adacore.com>

	* debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
	* make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
	instead of Debug.Debug_Flag_S.
	* makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
	No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
	error messages.
	* makeutl.ads (No_Exit_Message_Option): New constant string
	for switch --no-exit-message.
	* opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
	* switch-m.adb (Scan_Make_Switches): Recognize new switch
	--no-exit-message.

From-SVN: r213424
This commit is contained in:
Vincent Celier 2014-08-01 08:34:02 +00:00 committed by Arnaud Charlet
parent 16b10ccc1f
commit 3849c24686
7 changed files with 34 additions and 14 deletions

View File

@ -1,3 +1,17 @@
2014-08-01 Vincent Celier <celier@adacore.com>
* debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
* make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
instead of Debug.Debug_Flag_S.
* makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
error messages.
* makeutl.ads (No_Exit_Message_Option): New constant string
for switch --no-exit-message.
* opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
* switch-m.adb (Scan_Make_Switches): Recognize new switch
--no-exit-message.
2014-08-01 Arnaud Charlet <charlet@adacore.com>
* exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.

View File

@ -214,7 +214,7 @@ package body Debug is
-- dp Prints the contents of the Q used by Make.Compile_Sources
-- dq Prints source files as they are enqueued and dequeued
-- dr
-- ds Suppress exit message when compilation fails
-- ds
-- dt Display time stamps when there is a mismatch
-- du List units as their ali files are acquired
-- dv
@ -801,10 +801,6 @@ package body Debug is
-- used by routine Make.Compile_Sources. Useful to figure out the
-- order in which sources are recompiled.
-- ds When one or more compilations compilation fail, gnatmake does not
-- issue an error message such as:
-- gnatmake: "/path/to/main.adb" compilation error
-- dt When a time stamp mismatch has been found for an ALI file,
-- display the source file name, the time stamp expected and
-- the time stamp found.
@ -824,10 +820,6 @@ package body Debug is
-- of execution, such as temporary config pragma files, mapping
-- files or project path files.
-- ds When one or more compilations compilation fail, gprbuild does not
-- issue the error message:
-- gprbuild: *** compilation phase failed
-- dt When a time stamp mismatch has been found for an ALI file,
-- display the source file name, the time stamp expected and
-- the time stamp found.

View File

@ -6948,7 +6948,7 @@ package body Make is
procedure List_Bad_Compilations is
begin
if not Debug.Debug_Flag_S then
if not No_Exit_Message then
for J in Bad_Compilation.First .. Bad_Compilation.Last loop
if Bad_Compilation.Table (J).File = No_File then
null;

View File

@ -777,7 +777,7 @@ package body Makeutl is
Flush_Messages : Boolean := True)
is
begin
if Flush_Messages and then not Debug.Debug_Flag_S then
if Flush_Messages and then not No_Exit_Message then
if Total_Errors_Detected /= 0 or else Warnings_Detected /= 0 then
Errutil.Finalize;
end if;
@ -806,13 +806,13 @@ package body Makeutl is
if S'Length > 0 then
if Exit_Code /= E_Success then
if Debug.Debug_Flag_S then
if No_Exit_Message then
Osint.Exit_Program (E_Fatal);
else
Osint.Fail (S);
end if;
elsif not Debug.Debug_Flag_S then
elsif not No_Exit_Message then
Write_Str (S);
end if;
end if;

View File

@ -79,6 +79,12 @@ package Makeutl is
Create_Map_File_Switch : constant String := "--create-map-file";
-- Switch to create a map file when an executable is linked
No_Exit_Message_Option : constant String := "--no-exit-message";
-- Switch to suppress exit error message when there are compilation
-- failures. This is useful when a tool, such as gnatprove, call silently
-- the builder and do not want to pollute its output with error messages
-- coming from the builder. This is an internal switch.
Load_Standard_Base : Boolean := True;
-- False when gprbuild is called with --db-

View File

@ -1938,6 +1938,11 @@ package Opt is
-- This switch is not set when the pragma appears ahead of a given
-- unit, so it does not affect the compilation of other units.
No_Exit_Message : Boolean := False;
-- GNATMAKE, GPRBUILD
-- Set with switch --no-exit-message. When True, if there are compilation
-- failure, the builder does not issue an exit error message.
Optimize_Alignment_Config : Character;
-- GNAT
-- This is the value of the configuration switch that controls the

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2013, Free Software Foundation, Inc. --
-- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -790,6 +790,9 @@ package body Switch.M is
elsif Switch_Chars = Makeutl.Single_Compile_Per_Obj_Dir_Switch then
Opt.One_Compilation_Per_Obj_Dir := True;
elsif Switch_Chars = Makeutl.No_Exit_Message_Option then
Opt.No_Exit_Message := True;
elsif Switch_Chars (Ptr) = '-' then
Bad_Switch (Switch_Chars);