From: Felix Fietkau Date: Sun, 12 Nov 2006 01:55:28 +0000 (+0000) Subject: another optimization X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fyousong.git;a=commitdiff_plain;h=cf10a1dd5ec950121617cf51b84d00374f86480f;hp=8838ffd68d915fc356836468e30e7a26f1f6150a;ds=sidebyside another optimization SVN-Revision: 5507 --- diff --git a/Makefile b/Makefile index d6b1b7d618..62a0338746 100644 --- a/Makefile +++ b/Makefile @@ -21,10 +21,15 @@ SHELL:=/usr/bin/env bash export LC_ALL=C export LANG=C export TOPDIR=${shell pwd} -include $(TOPDIR)/include/verbose.mk ifeq ($(KBUILD_VERBOSE),99) MAKE:=3>/dev/null $(MAKE) endif +ifneq ($(shell tty -s <&3 || echo x),x) + IS_TTY=1 + export IS_TTY +endif + +include $(TOPDIR)/include/verbose.mk OPENWRTVERSION:=$(RELEASE) ifneq ($(VERSION),) diff --git a/include/verbose.mk b/include/verbose.mk index 34568a31f8..b4242f212a 100644 --- a/include/verbose.mk +++ b/include/verbose.mk @@ -18,7 +18,7 @@ ifeq ("$(origin V)", "command line") KBUILD_VERBOSE:=$(V) endif -ifneq ($(shell tty -s <&3 || echo x),x) +ifeq ($(IS_TTY),1) _Y:="\\33[33m"# yellow _N:="\\33[m"# normal endif