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)
35 ifeq ($(findstring s
,$(OPENWRT_VERBOSE
)),)
37 printf
"$(_Y)%s$(_N)\n" "$(1)" >&8
41 printf
"$(_R)%s$(_N)\n" "$(1)" >&8
45 ifneq ($(CURDIR
),$(TOPDIR
))
46 _DIR
:=$(patsubst $(TOPDIR
)/%,%,${CURDIR})
50 _NULL
:=$(if
$(MAKECMDGOALS
),$(shell \
51 $(call MESSAGE
, make
[$(MAKELEVEL
)]$(if
$(_DIR
), -C
$(_DIR
)) $(MAKECMDGOALS
)); \
55 SILENT
:=>/dev
/null
$(if
$(findstring w
,$(OPENWRT_VERBOSE
)),,2>&1)
57 SUBMAKE
=cmd
() { $(SILENT
) $(MAKE
) -s
"$$@" < /dev
/null ||
{ echo
"make $$*: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on"; false
; } } 8>&1 9>&2; cmd
60 .SILENT
: $(MAKECMDGOALS
)
66 ERROR_MESSAGE
=$(MESSAGE
)