[From nobody Thu Jun 25 05:55:01 2020
Received: from sonic312-26.consmr.mail.ir2.yahoo.com ([77.238.178.97])
 by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
 id 1goqQo-0005I7-Rw
 for openwrt-devel@lists.openwrt.org; Wed, 30 Jan 2019 14:01:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1548856891; bh=E8fv9l05PvdvFfJSgmd0CPkRO0HHHMr9y6VHxgidvGY=;
 h=To:Cc:From:Subject:Date:From:Subject;
 b=FYMc53ZYQkC3trMiqnX6pawuaB6nQ+1zZI4otupZ0rsKqFnB9C4a7hugH2XYCfFLSpe72hlnaZL60LTlVXSU5O0hWHGV5x5JjAPOE9ATJcTsE2pfW8MerIHr7WsysbmC03Dz7W8hGAT9SrDV72wwgoCVEy/2mOVFyR+NO+WmPl6nuCRpAg/eTabpot8zNcC64PKwyysImw7kiOWAi8MWTui2n9u6KYdcDOU7tBf99jAE8qmfWiIKQKGjkOXs0AeMRoVlXANxtInfykBIAMLa04n5MVFpbKl88Vm47UYiVFmOuwDrdla3WLQxo/eGd8tGHXrNa2UN+9qAkBsX+yZlWg==
X-YMail-OSG: GSCBs1IVM1mnMf81HP_fo8pWWoTLYRYR4uTwI6VGey4fI7Djt8JChrU1pBQ7PqS
 V16a_VV0hyxBGm1tz.pBjFpt3vsSFYru4BA8vcC.072QXr.6vU6QSt7vLe2qQMTkzvUnM0sVYkAO
 09fUPqzjO.DcnEH6cYrrJ5XpOR8cmDjW09KsaZIsunXUxgDRsSgjJ2TOXsjxdGx6rvulCQKngph1
 SqxAJEVSBrSg5yc1hXnPnYKQotxuu5n8xyLturStUA.6nIaj7QceiqkSZZtPOWLLLgONpuIwyk5u
 oTAUqW0GB1Ejc173LYwqbfQFfOg5bvVLN0JPykcNxYd4NGtK3TSXOs250MjesXbChA8NEy9TexYc
 nBXAj6QHIiBzajujArRM4t7lz0yv12hFUNhQ.GFwyS1UvTSdHEvIyCYizOkKv8mirs5EtCCWrX7n
 gEkSfZaWeHkH4pOf4V0DToWvOCUqBULE4K65B27oJ1Bsm5cDF4YRdI_WJa.xNDo9bFxF2YZI2Ces
 ucYGVW_VxNkvlUcOvC2xais4OI1u55DE14V3fTWEm7zmiYQwgEhurkTkfYVWs0sp71ALdeJbD6KI
 ew7YdH0vvCc2cdq92y26j0jHZbLg_57SoJxo2IDXe3iEwjyGhNGyW_S8mYuCzI5_7Yeulmy8dwwx
 T_V0Dr1QUxbEEA5V0byXLGDRDJeK98UP9ukd9tlXyjymi7AVvSIKyXz_wiRIdw0ATtzCv030pqyo
 orV_ZiLawH6hJQQgSbgHWSirjFa0gBl9D3r98injhg9Z..J_MiSlrg2fUwD91HzcGp4J5Sy1Rln7
 N5v3MwHm36KUOUxpHRmo0gMOx_ZEEe7PbQpb15Y1qryWbRY.5jtIKcBlfykrNPSS2K1oyPIKOCLC
 By.k830enFnvvgo7oXcbEt6dPiJex2naPDwFkucvfWpjmyx0OJRX7vdMXTfZwdZzyzubpEQfxySu
 d.ZrTvbLcbOI8.ygYioxR4s2ibrgBu_e6jUfIGsZPxIo60G0eJatiyRqo6N6h.C5i5yKeeBe62wI
 aoeHxnAq1RemOYmArV0nMOcsKLS3GNahG6E59I2LuIClUbaaI1nTwIz6j4ibs
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic312.consmr.mail.ir2.yahoo.com with HTTP; Wed, 30 Jan 2019 14:01:31 +0000
Received: from p4FE45EB7.dip0.t-ipconnect.de (EHLO [192.168.1.137])
 ([79.228.94.183])
 by smtp430.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID
 8397824e32c1b6dc4f8d9c53bab491d6; 
 Wed, 30 Jan 2019 14:01:30 +0000 (UTC)
To: jow@openwrt.org
Cc: OpenWrt Development List &lt;openwrt-devel@lists.openwrt.org&gt;
From: &quot;R. Diez&quot; &lt;rdiezmail-openwrt@yahoo.com&gt;
Subject: [OpenWrt-Devel] [PATCH] Honour NO_COLOR in include/scan.mk
Message-ID: &lt;413fed74-df8e-c98c-0611-a867b17f3c9a@yahoo.com&gt;
Date: Wed, 30 Jan 2019 15:01:25 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20190130_060135_056629_FB7B9DE0 
X-CRM114-Status: GOOD (  10.81  )
X-Spam-Score: -0.2 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
 Content analysis details:   (-0.2 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/,
 no trust [77.238.178.97 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rdiezmail-openwrt[at]yahoo.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
 valid
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
 envelope-from domain
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
 author's domain
 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [77.238.178.97 listed in wl.mailspike.net]


 &gt; Could you please send a V2 with the requested change
 &gt; 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 &lt;R. Diez&gt;
---
  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 &quot;\033[M\r$(1)&quot; &gt;&amp;2;
-  endef
+    endef
+  else
+    define progress
+	printf &quot;\r$(1)&quot; &gt;&amp;2;
+    endef
+  endif
  else
    define progress
  	:;
-- 
2.20.1

]