diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-17 21:12:02 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-17 21:12:02 +0000 |
commit | b2fb1adf63474178ff5658a61c66c0b1401e7992 (patch) | |
tree | 26d2faea684ebed18b111827830dc97c2e01b5b4 /include | |
parent | 847145b0c220aef94137ea482648039fb814aa8b (diff) |
build: make the color of the 'configuration out of sync' warning red to make it harder for users to overlook
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36082 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/toplevel.mk | 5 | ||||
-rw-r--r-- | include/verbose.mk | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/toplevel.mk b/include/toplevel.mk index 0918298b1..5e8e6dd1b 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -9,6 +9,8 @@ RELEASE:=Barrier Breaker PREP_MK= OPENWRT_BUILD= QUIET=0 +export IS_TTY=$(shell tty -s && echo 1 || echo 0) + include $(TOPDIR)/include/verbose.mk ifeq ($(SDK),1) @@ -22,7 +24,6 @@ OPENWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION))) export RELEASE export REVISION export OPENWRTVERSION -export IS_TTY=$(shell tty -s && echo 1 || echo 0) export LD_LIBRARY_PATH:=$(subst ::,:,$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib) export DYLD_LIBRARY_PATH:=$(subst ::,:,$(if $(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib) export GIT_CONFIG_PARAMETERS='core.autocrlf=false' @@ -148,7 +149,7 @@ prereq:: prepare-tmpinfo .config cp .config tmp/.config; \ ./scripts/config/conf -D tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \ if ./scripts/kconfig.pl '>' .config tmp/.config | grep -q CONFIG; then \ - echo "WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!" >&2; \ + printf "$(_R)WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \ fi \ ) @+$(ULIMIT_FIX) $(SUBMAKE) -r $@ diff --git a/include/verbose.mk b/include/verbose.mk index 2e8ace442..d34f55fc4 100644 --- a/include/verbose.mk +++ b/include/verbose.mk @@ -27,6 +27,7 @@ endif ifeq ($(IS_TTY),1) ifneq ($(strip $(NO_COLOR)),1) _Y:=\\033[33m + _R:=\\033[31m _N:=\\033[m endif endif @@ -36,6 +37,10 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),) printf "$(_Y)%s$(_N)\n" "$(1)" >&8 endef + define ERROR_MESSAGE + printf "$(_R)%s$(_N)\n" "$(1)" >&8 + endef + ifeq ($(QUIET),1) ifneq ($(CURDIR),$(TOPDIR)) _DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) @@ -58,4 +63,5 @@ else define MESSAGE printf "%s\n" "$(1)" endef + ERROR_MESSAGE=$(MESSAGE) endif |