[OpenWrt-Devel] [PATCH] Honour NO_COLOR in include/scan.mk

Hauke Mehrtens hauke at hauke-m.de
Sun Feb 17 13:32:18 EST 2019


On 1/30/19 3:01 PM, R. Diez wrote:
> 
>> 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 <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
>      :;

Hi,

I applied the wrong version of your patch, next time please use a "patch
v2" to mark the second patch.

The original patch was also somehow white space broken, I would suggest
to use "git send-email" for sending patches.

Hauke

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list