1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2006-2020 OpenWrt.org
8 ifeq ("$(origin V)", "command line")
12 ifeq ($(OPENWRT_VERBOSE
),1)
15 ifeq ($(OPENWRT_VERBOSE
),99)
19 ifeq ($(NO_TRACE_MAKE
),)
20 NO_TRACE_MAKE
:= $(MAKE
) V
=s
$(OPENWRT_VERBOSE
)
25 ifneq ($(strip $(NO_COLOR
)),1)
32 ifeq ($(findstring s
,$(OPENWRT_VERBOSE
)),)
34 printf
"$(_Y)%s$(_N)\n" "$(1)" >&8
38 printf
"$(_R)%s$(_N)\n" "$(1)" >&8
42 ifneq ($(CURDIR
),$(TOPDIR
))
43 _DIR
:=$(patsubst $(TOPDIR
)/%,%,${CURDIR})
47 _NULL
:=$(if
$(MAKECMDGOALS
),$(shell \
48 $(call MESSAGE
, make
[$(MAKELEVEL
)]$(if
$(_DIR
), -C
$(_DIR
)) $(MAKECMDGOALS
)); \
52 SILENT
:=>/dev
/null
$(if
$(findstring w
,$(OPENWRT_VERBOSE
)),,2>&1)
54 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
57 .SILENT
: $(MAKECMDGOALS
)
63 ERROR_MESSAGE
=$(MESSAGE
)