From patchwork Tue Jun 22 12:34:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 56470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 43200B707F for ; Tue, 22 Jun 2010 22:34:13 +1000 (EST) Received: (qmail 31286 invoked by alias); 22 Jun 2010 12:34:11 -0000 Received: (qmail 31266 invoked by uid 22791); 22 Jun 2010 12:34:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Jun 2010 12:34:04 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 88011CB027F; Tue, 22 Jun 2010 14:34:05 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eyHjabcRWNnM; Tue, 22 Jun 2010 14:34:05 +0200 (CEST) Received: from saumur.act-europe.fr (saumur.act-europe.fr [10.10.0.183]) by mel.act-europe.fr (Postfix) with ESMTP id 717F4CB024F; Tue, 22 Jun 2010 14:34:05 +0200 (CEST) Received: by saumur.act-europe.fr (Postfix, from userid 525) id 690F9D9B31; Tue, 22 Jun 2010 14:34:05 +0200 (CEST) Date: Tue, 22 Jun 2010 14:34:05 +0200 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Vincent Celier Subject: [Ada] Shorter display for shared library building Message-ID: <20100622123405.GA23035@adacore.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.9i X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org When a shared library is built, in non verbose mode, the displays of the command used are now truncated if they are deemed too long. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-06-22 Vincent Celier * mlib-prj.adb (Display): In non verbose mode, truncate after fourth argument. * mlib-utl.adb (Gcc): In non verbose mode, truncate the display of the gcc command if it is too long. Index: mlib-prj.adb =================================================================== --- mlib-prj.adb (revision 161073) +++ mlib-prj.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2009, AdaCore -- +-- Copyright (C) 2001-2010, 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- -- @@ -2285,6 +2285,11 @@ package body MLib.Prj is for Index in 1 .. Argument_Number loop Write_Char (' '); Write_Str (Arguments (Index).all); + + if not Opt.Verbose_Mode and then Index > 4 then + Write_Str (" ..."); + exit; + end if; end loop; Write_Eol; Index: mlib-utl.adb =================================================================== --- mlib-utl.adb (revision 161073) +++ mlib-utl.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2008, AdaCore -- +-- Copyright (C) 2002-2010, 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- -- @@ -460,11 +460,25 @@ package body MLib.Utl is end loop; if not Opt.Quiet_Output then - Write_Str (Driver.all); + if Opt.Verbose_Mode then + Write_Str (Driver.all); + + elsif Driver_Name /= No_Name then + Write_Str (Get_Name_String (Driver_Name)); + + else + Write_Str (Gcc_Name.all); + end if; for J in 1 .. A loop - Write_Char (' '); - Write_Str (Arguments (J).all); + if Opt.Verbose_Mode or else J < 4 then + Write_Char (' '); + Write_Str (Arguments (J).all); + + else + Write_Str (" ..."); + exit; + end if; end loop; -- Do not display all the object files if not in verbose mode, only @@ -480,10 +494,19 @@ package body MLib.Utl is elsif Position = Second then Write_Str (" ..."); Position := Last; + exit; end if; end loop; for J in Options_2'Range loop + if not Opt.Verbose_Mode then + if Position = Second then + Write_Str (" ..."); + end if; + + exit; + end if; + Write_Char (' '); Write_Str (Options_2 (J).all); end loop;