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.
11 ifeq ("$(origin V)", "command line")
15 ifeq ($(OPENWRT_VERBOSE),1)
18 ifeq ($(OPENWRT_VERBOSE),99)
22 ifeq ($(NO_TRACE_MAKE),)
23 NO_TRACE_MAKE := $(MAKE) V=s$(OPENWRT_VERBOSE)
28 ifneq ($(strip $(NO_COLOR)),1)
34 ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
36 printf "$(_Y)%s$(_N)\n" "$(1)" >&8
40 ifneq ($(CURDIR),$(TOPDIR))
41 _DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
45 _NULL:=$(if $(MAKECMDGOALS),$(shell \
46 $(call MESSAGE, make[$(MAKELEVEL)]$(if $(_DIR), -C $(_DIR)) $(MAKECMDGOALS)); \
50 SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
52 SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
55 .SILENT: $(MAKECMDGOALS)