From patchwork Fri Jan 25 18:07:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 10781813 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BAED91399 for ; Fri, 25 Jan 2019 18:08:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6FBB302F7 for ; Fri, 25 Jan 2019 18:08:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B6923033E; Fri, 25 Jan 2019 18:08:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FA4030368 for ; Fri, 25 Jan 2019 18:08:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729521AbfAYSIN (ORCPT ); Fri, 25 Jan 2019 13:08:13 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51974 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbfAYSIL (ORCPT ); Fri, 25 Jan 2019 13:08:11 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D51171596; Fri, 25 Jan 2019 10:08:10 -0800 (PST) Received: from donnerap.arm.com (donnerap.cambridge.arm.com [10.1.197.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E717A3F5AF; Fri, 25 Jan 2019 10:08:09 -0800 (PST) From: Andre Przywara To: Will Deacon Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH kvmtool 3/6] Makefile: support -s switch Date: Fri, 25 Jan 2019 18:07:58 +0000 Message-Id: <20190125180801.209910-4-andre.przywara@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125180801.209910-1-andre.przywara@arm.com> References: <20190125180801.209910-1-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "make -s" suppresses normal output, just shows warnings and errors. But since we explicitly override the make output with our fancy concise version, we miss out on this feature. Do as the kernel does and explicitly suppress every normal output when -s is given. This helps to spot warnings that scroll out of the terminal window too quickly. Signed-off-by: Andre Przywara --- Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c4faff66..a68cfcd5 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,22 @@ # Define WERROR=0 to disable -Werror. # +ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 +ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) + silent=1 +endif +else # make-3.8x +ifneq ($(filter s% -s%,$(MAKEFLAGS)),) + silent=1 +endif +endif + ifeq ($(strip $(V)),) - E = @echo + ifeq ($(silent),) + E = @echo + else + E = @\# + endif Q = @ else E = @\#