[PATCH] Honour NO_COLOR in include/scan.mk
R. Diez
rdiezmail-openwrt at yahoo.com
Mon Jan 21 10:31:57 PST 2019
Hi all:
This is my first OpenWrt patch. I am a clean, pure newbie! 8-)
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 <rdiezmail-openwrt at yahoo.com>
---
include/scan.mk | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/scan.mk b/include/scan.mk
index e6b21b2..724dbfa 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
+ :;
+ endef
+ endif
else
define progress
:;
--
2.20.1
More information about the openwrt-devel
mailing list