Commit a7ab2998 by Vincent Celier Committed by Arnaud Charlet

make.adb (Compile_Sources): Change verbose message to minimum verbosity level…

make.adb (Compile_Sources): Change verbose message to minimum verbosity level High for "is in an Ada...

2005-11-14  Vincent Celier  <celier@adacore.com>

	* make.adb (Compile_Sources): Change verbose message to minimum
	verbosity level High for "is in an Ada library", "is a read-only
	library" and "is an internal library",
	(Create_Binder_Mapping_File): Path name of ALI file for library project
	must include the library directory, not the object directory.
	(Scan_Make_Arg): Make sure that Switch.M.Scan_Make_Switches is called
	for new switches -vl, -vm and -vh.
	(Verbose_Msg): Add new defaulted parameter Minimum_Verbosity
	(Check): Use minimum verbosity Medium for some Verbose_Msg calls
	(Compile_Sources): Do not attempt to compile if an ALI file is missing
	in a project that is externally built.
	(Compute_All_Imported_Projects): New procedure
	(Gnatmake): Check if importing libraries should be regenerated because
	at least an imported library is more recent.
	(Initialize): For each project compute the list of the projects it
	imports directly or indirectly.
	(Add_Library_Search_Dir): New procedure, used in place of
	Add_Lib_Search_Dir in procedure Scan_Make_Arg so that absolute paths are
	put in the search paths.
	(Add_Source_Search_Dir): New procedure, used in place of
	Add_Src_Search_Dir in procedure Scan_Make_Arg so that absolute paths are
	put in the search paths.
	(Mark_Directory): Resolve the absolute path the directory before marking
	it.

	* switch-m.adb (Scan_Make_Switches): Replace "raise Bad_Switch;" with
	call to new procedure Bad_Switch. Call Scan_Pos with new parameter
	Switch. Do not handle any exception.
	(Scan_Make_Switches): Increment Ptr for new switches -vl, -vm and -vh
	so that the switch is recognized as valid.
	(Scan_Make_Switches): Implement new switches -vl, -vm and -vh.

From-SVN: r106989
parent dff0475f
......@@ -491,7 +491,7 @@ package body Switch.M is
-- Skip past the initial character (must be the switch character)
if Ptr = Max then
raise Bad_Switch;
Bad_Switch (C);
else
Ptr := Ptr + 1;
......@@ -581,7 +581,7 @@ package body Switch.M is
then
Set_Debug_Flag (C);
else
raise Bad_Switch;
Bad_Switch (C);
end if;
end loop;
......@@ -593,7 +593,7 @@ package body Switch.M is
Ptr := Ptr + 1;
if Ptr > Max then
raise Bad_Switch;
Bad_Switch (C);
end if;
case Switch_Chars (Ptr) is
......@@ -602,7 +602,7 @@ package body Switch.M is
when 'I' =>
Ptr := Ptr + 1;
Scan_Pos (Switch_Chars, Max, Ptr, Main_Index);
Scan_Pos (Switch_Chars, Max, Ptr, Main_Index, C);
-- processing for eL switch
......@@ -611,7 +611,7 @@ package body Switch.M is
Follow_Links := True;
when others =>
raise Bad_Switch;
Bad_Switch (C);
end case;
-- Processing for f switch
......@@ -646,7 +646,7 @@ package body Switch.M is
declare
Max_Proc : Pos;
begin
Scan_Pos (Switch_Chars, Max, Ptr, Max_Proc);
Scan_Pos (Switch_Chars, Max, Ptr, Max_Proc, C);
Maximum_Processes := Positive (Max_Proc);
end;
......@@ -679,7 +679,7 @@ package body Switch.M is
Ptr := Ptr + 1;
if Output_File_Name_Present then
raise Too_Many_Output_Files;
Osint.Fail ("duplicate -o switch");
else
Output_File_Name_Present := True;
end if;
......@@ -707,6 +707,25 @@ package body Switch.M is
when 'v' =>
Ptr := Ptr + 1;
Verbose_Mode := True;
Verbosity_Level := Opt.High;
if Ptr <= Max then
case Switch_Chars (Ptr) is
when 'l' =>
Verbosity_Level := Opt.Low;
when 'm' =>
Verbosity_Level := Opt.Medium;
when 'h' =>
Verbosity_Level := Opt.High;
when others =>
Osint.Fail ("invalid switch: ", Switch_Chars);
end case;
Ptr := Ptr + 1;
end if;
-- Processing for x switch
......@@ -728,7 +747,7 @@ package body Switch.M is
-- Anything else is an error (illegal switch character)
when others =>
raise Bad_Switch;
Bad_Switch (C);
end case;
......@@ -738,19 +757,6 @@ package body Switch.M is
end Check_Switch;
exception
when Bad_Switch =>
Osint.Fail ("invalid switch: ", (1 => C));
when Bad_Switch_Value =>
Osint.Fail ("numeric value out of range for switch: ", (1 => C));
when Missing_Switch_Value =>
Osint.Fail ("missing numeric value for switch: ", (1 => C));
when Too_Many_Output_Files =>
Osint.Fail ("duplicate -o switch");
end Scan_Make_Switches;
end Switch.M;
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