You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1003 B
44 lines
1003 B
19 years ago
|
#
|
||
|
# Copyright (C) 2006 OpenWrt.org
|
||
|
#
|
||
|
# This is free software, licensed under the GNU General Public License v2.
|
||
|
# See /LICENSE for more information.
|
||
|
#
|
||
19 years ago
|
# $Id:$
|
||
|
|
||
19 years ago
|
ifeq ($(NO_TRACE_MAKE),)
|
||
|
NO_TRACE_MAKE := $(MAKE) V=99
|
||
|
export NO_TRACE_MAKE
|
||
|
endif
|
||
19 years ago
|
|
||
19 years ago
|
ifndef KBUILD_VERBOSE
|
||
19 years ago
|
KBUILD_VERBOSE:=0
|
||
|
endif
|
||
|
ifeq ("$(origin V)", "command line")
|
||
|
KBUILD_VERBOSE:=$(V)
|
||
19 years ago
|
endif
|
||
|
|
||
19 years ago
|
ifneq ($(shell tty -s <&3 || echo x),x)
|
||
|
_Y:="\\33[33m"# yellow
|
||
|
_N:="\\33[m"# normal
|
||
|
endif
|
||
|
|
||
19 years ago
|
ifneq ($(KBUILD_VERBOSE),99)
|
||
19 years ago
|
ifeq ($(QUIET),1)
|
||
|
$(MAKECMDGOALS): trace
|
||
|
trace: FORCE
|
||
|
@[ -f "$(MAKECMDGOALS)" ] || { \
|
||
|
[ -z "$${PWD##$$TOPDIR}" ] || DIR=" -C $${PWD##$$TOPDIR/}"; \
|
||
19 years ago
|
echo -e "$(_Y)make[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)$(_N)" >&3; \
|
||
19 years ago
|
}
|
||
|
else
|
||
|
export QUIET:=1
|
||
19 years ago
|
ifeq ($(KBUILD_VERBOSE),0)
|
||
|
MAKE:=&>/dev/null $(MAKE)
|
||
|
endif
|
||
18 years ago
|
MAKE:=cmd() { $(MAKE) $$* || { echo "Build failed. Please re-run make with V=99 to see what's going on"; false; } } 3>&1 4>&2; cmd
|
||
19 years ago
|
endif
|
||
|
|
||
|
.SILENT: $(MAKECMDGOALS)
|
||
|
endif
|