2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 ifeq ($(NO_TRACE_MAKE),)
10 NO_TRACE_MAKE := $(MAKE) V=99
17 ifeq ("$(origin V)", "command line")
22 _Y:="\\033[33m" # yellow
26 ifneq ($(KBUILD_VERBOSE),99)
28 $(MAKECMDGOALS): trace
30 @[ -f "$(MAKECMDGOALS)" ] || { \
31 [ -z "$${PWD##$$TOPDIR}" ] || DIR=" -C $${PWD##$$TOPDIR/}"; \
32 echo -e "$(_Y)make[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)$(_N)" >&3; \
36 ifeq ($(KBUILD_VERBOSE),0)
37 MAKE:=&>/dev/null $(MAKE)
39 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
42 .SILENT: $(MAKECMDGOALS)