[PATCH] build: IS_TTY is now set according to GNU Make's MAKE_TERMOUT

Hauke Mehrtens hauke at hauke-m.de
Sun Jun 21 12:26:41 EDT 2020


On 6/10/20 11:33 AM, R. Diez wrote:
> Fixes: FS#2086
> The logic for IS_TTY was broken, because it was testing stdin
> instead of stdout.
> MAKE_TERMOUT was introduced in GNU Make version 4.1 (05 Oct 2014),
> so it should be available everywhere nowadays.

Currently OpenWrt requires "GNU make v3.82", see include/prereq-build.mk

Hauke

> 
> Signed-off-by: R. Diez <rdiezmail-openwrt at yahoo.com>
> ---
>  include/toplevel.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/toplevel.mk b/include/toplevel.mk
> index 5cf93ce7ef..a9c503db61 100644
> --- a/include/toplevel.mk
> +++ b/include/toplevel.mk
> @@ -8,7 +8,7 @@
>  
>  PREP_MK= OPENWRT_BUILD= QUIET=0
>  
> -export IS_TTY=$(shell tty -s && echo 1 || echo 0)
> +export IS_TTY=$(if $(MAKE_TERMOUT),1,0)
>  
>  include $(TOPDIR)/include/verbose.mk
>  
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200621/40254832/attachment-0001.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list