aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2007-04-06 11:24:28 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-04-06 11:24:28 +0200
commit0780eccc5da4e9c0f4e8492fab37e13459da6476 (patch)
tree563a614cf2fe714c51cbba326b304bb16359a781 /gcc/ada
parent0916df6a3e3a63c275b1b88b6298bcdd97e9b2d4 (diff)
downloadgcc-0780eccc5da4e9c0f4e8492fab37e13459da6476.zip
gcc-0780eccc5da4e9c0f4e8492fab37e13459da6476.tar.gz
gcc-0780eccc5da4e9c0f4e8492fab37e13459da6476.tar.bz2
mlib.adb (Building_Library): Only output "building a library..." in verbose mode
2007-04-06 Vincent Celier <celier@adacore.com> * mlib.adb (Building_Library): Only output "building a library..." in verbose mode * mlib-prj.adb (Build_Library): Only output lists of object and ALI files in verbose mode. * mlib-utl.adb (Ar): Only output the first object files when not in verbose mode. (Gcc): Do not display all the object files if not in verbose mode, only the first one. From-SVN: r123585
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/mlib-prj.adb39
-rw-r--r--gcc/ada/mlib-utl.adb45
-rw-r--r--gcc/ada/mlib.adb4
3 files changed, 63 insertions, 25 deletions
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index 8910072..307e4f6 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -1393,30 +1393,35 @@ package body MLib.Prj is
Write_Str (" library for project ");
Write_Line (Project_Name);
- Write_Eol;
+ -- Only output the list of object files and ALI files in verbose
+ -- mode.
- Write_Line ("object files:");
+ if Opt.Verbose_Mode then
+ Write_Eol;
- for Index in Object_Files'Range loop
- Write_Str (" ");
- Write_Line (Object_Files (Index).all);
- end loop;
+ Write_Line ("object files:");
- Write_Eol;
+ for Index in Object_Files'Range loop
+ Write_Str (" ");
+ Write_Line (Object_Files (Index).all);
+ end loop;
- if Ali_Files'Length = 0 then
- Write_Line ("NO ALI files");
+ Write_Eol;
- else
- Write_Line ("ALI files:");
+ if Ali_Files'Length = 0 then
+ Write_Line ("NO ALI files");
- for Index in Ali_Files'Range loop
- Write_Str (" ");
- Write_Line (Ali_Files (Index).all);
- end loop;
- end if;
+ else
+ Write_Line ("ALI files:");
- Write_Eol;
+ for Index in Ali_Files'Range loop
+ Write_Str (" ");
+ Write_Line (Ali_Files (Index).all);
+ end loop;
+ end if;
+
+ Write_Eol;
+ end if;
end if;
-- We check that all object files are regular files
diff --git a/gcc/ada/mlib-utl.adb b/gcc/ada/mlib-utl.adb
index 821bfa9..09c8926 100644
--- a/gcc/ada/mlib-utl.adb
+++ b/gcc/ada/mlib-utl.adb
@@ -124,6 +124,14 @@ package body MLib.Utl is
end if;
Write_Char (' ');
+
+ -- Only output the first object files when not in verbose mode
+
+ if (not Opt.Verbose_Mode) and then J = Ar_Options'Length + 3 then
+ Write_Str ("...");
+ exit;
+ end if;
+
Write_Str (Arguments (J).all);
Line_Length := Line_Length + 1 + Arguments (J)'Length;
end loop;
@@ -209,6 +217,10 @@ package body MLib.Utl is
Driver : String_Access;
+ type Object_Position is (First, Second, Last);
+
+ Position : Object_Position;
+
begin
if Driver_Name = No_Name then
if Gcc_Exec = null then
@@ -246,12 +258,6 @@ package body MLib.Utl is
A := A + Options'Length;
Arguments (A - Options'Length + 1 .. A) := Options;
- A := A + Objects'Length;
- Arguments (A - Objects'Length + 1 .. A) := Objects;
-
- A := A + Options_2'Length;
- Arguments (A - Options_2'Length + 1 .. A) := Options_2;
-
if not Opt.Quiet_Output then
Write_Str (Driver.all);
@@ -260,9 +266,36 @@ package body MLib.Utl is
Write_Str (Arguments (J).all);
end loop;
+ -- Do not display all the object files if not in verbose mode, only
+ -- the first one.
+
+ Position := First;
+ for J in Objects'Range loop
+ if Opt.Verbose_Mode or else Position = First then
+ Write_Char (' ');
+ Write_Str (Objects (J).all);
+ Position := Second;
+
+ elsif Position = Second then
+ Write_Str (" ...");
+ Position := Last;
+ end if;
+ end loop;
+
+ for J in Options_2'Range loop
+ Write_Char (' ');
+ Write_Str (Options_2 (J).all);
+ end loop;
+
Write_Eol;
end if;
+ A := A + Objects'Length;
+ Arguments (A - Objects'Length + 1 .. A) := Objects;
+
+ A := A + Options_2'Length;
+ Arguments (A - Options_2'Length + 1 .. A) := Options_2;
+
OS_Lib.Spawn (Driver.all, Arguments (1 .. A), Success);
if not Success then
diff --git a/gcc/ada/mlib.adb b/gcc/ada/mlib.adb
index 549578a..def15c2 100644
--- a/gcc/ada/mlib.adb
+++ b/gcc/ada/mlib.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2005, AdaCore --
+-- Copyright (C) 1999-2006, AdaCore --
-- --
-- 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- --
@@ -53,7 +53,7 @@ package body MLib is
pragma Warnings (Off, Afiles);
begin
- if not Opt.Quiet_Output then
+ if Opt.Verbose_Mode and not Opt.Quiet_Output then
Write_Line ("building a library...");
Write_Str (" make ");
Write_Line (Output_File);