From patchwork Wed Jan 30 14:01:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard via openwrt-devel X-Patchwork-Id: 1033566 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rdaHoV9e"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43qQ5n6GByz9sBb for ; Thu, 31 Jan 2019 01:01:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Date:Sender:Content-Type: Subject:List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:Cc: From:List-Post:List-Id:Message-ID:MIME-Version:To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=smb6Hs9X281zUHl6o9ahMPWm5eKZCa51Ro6M3nDNRWA=; b=rdaHoV9eIqABpCGKtzERS33X5u Kg7fbyFcvxUHCWvPOYtTphvSrvd/t/hGqt0w/z8Nn0HoDsHCtE0berg/683V8ld0dv0vgyc+ecgrB uFQnhWmqyJ4v6u+m61ySnkSlV4qFGL6FrXk7TU6Hsz4LXA3qWZrz5Og9AJcTfa2fWH4P4KVzuY4WO lLsbXPxRCTDdVOZOL68ENAnf4OyBtl/v6AjFQ6v2QQjl0L9Je2W915+GNyWC2Xv349ceFCSQFZj3f Q/GTwzlAa+15zA5w0JVwAIsH7tKvwsjxiG5WHKnHGSYJJ6TuGtCI7LW7m8FPRoO/hAORNxHT1ND42 PlIvNcbQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goqQr-0005IT-Op; Wed, 30 Jan 2019 14:01:37 +0000 To: jow@openwrt.org MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: "R. Diez via openwrt-devel" From: Thomas Richard via openwrt-devel Precedence: list Cc: OpenWrt Development List X-Mailman-Version: 2.1.21 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: "R. Diez" List-Help: Subject: [OpenWrt-Devel] [PATCH] Honour NO_COLOR in include/scan.mk Sender: "openwrt-devel" Date: Wed, 30 Jan 2019 14:01:37 +0000 Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. > Could you please send a V2 with the requested change > to print $(1) without ANSII escape sequences? Here it goes: Honour NO_COLOR in Makefile function 'progress' in include/scan.mk, in the same way that include/verbose.mk does. Signed-off-by: R. Diez --- include/scan.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/scan.mk b/include/scan.mk index e6b21b27b0..d9cd4f7e8c 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -19,9 +19,15 @@ else endif ifeq ($(IS_TTY),1) - define progress + ifneq ($(strip $(NO_COLOR)),1) + define progress printf "\033[M\r$(1)" >&2; - endef + endef + else + define progress + printf "\r$(1)" >&2; + endef + endif else define progress :;