projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rootfs: fix USE_APK detection
[openwrt/openwrt.git]
/
include
/
verbose.mk
diff --git
a/include/verbose.mk
b/include/verbose.mk
index e17b1264d85e9cab8dc90c27349f560570e7dae7..f6aa0d701213907f8493afa408d723a246a7686c 100644
(file)
--- a/
include/verbose.mk
+++ b/
include/verbose.mk
@@
-1,9
+1,6
@@
-#
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
+# SPDX-License-Identifier: GPL-2.0-only
#
#
+# Copyright (C) 2006-2020 OpenWrt.org
ifndef OPENWRT_VERBOSE
OPENWRT_VERBOSE:=
ifndef OPENWRT_VERBOSE
OPENWRT_VERBOSE:=
@@
-20,20
+17,31
@@
ifeq ($(OPENWRT_VERBOSE),99)
endif
ifeq ($(NO_TRACE_MAKE),)
endif
ifeq ($(NO_TRACE_MAKE),)
-NO_TRACE_MAKE := $(MAKE) V=
$(subst w,s,$(OPENWRT_VERBOSE)
)
+NO_TRACE_MAKE := $(MAKE) V=
s$(OPENWRT_VERBOSE
)
export NO_TRACE_MAKE
endif
ifeq ($(IS_TTY),1)
ifneq ($(strip $(NO_COLOR)),1)
_Y:=\\033[33m
export NO_TRACE_MAKE
endif
ifeq ($(IS_TTY),1)
ifneq ($(strip $(NO_COLOR)),1)
_Y:=\\033[33m
+ _R:=\\033[31m
_N:=\\033[m
endif
endif
_N:=\\033[m
endif
endif
+define ERROR_MESSAGE
+ { \
+ printf "$(_R)%s$(_N)\n" "$(1)" >&9 || \
+ printf "$(_R)%s$(_N)\n" "$(1)"; \
+ } >&2 2>/dev/null
+endef
+
ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
define MESSAGE
ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
define MESSAGE
- printf "$(_Y)%s$(_N)\n" "$(1)" >&8
+ { \
+ printf "$(_Y)%s$(_N)\n" "$(1)" >&8 || \
+ printf "$(_Y)%s$(_N)\n" "$(1)"; \
+ } 2>/dev/null
endef
ifeq ($(QUIET),1)
endef
ifeq ($(QUIET),1)
@@
-42,14
+50,17
@@
ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
else
_DIR:=
endif
else
_DIR:=
endif
- _
NULL
:=$(if $(MAKECMDGOALS),$(shell \
+ _
MESSAGE
:=$(if $(MAKECMDGOALS),$(shell \
$(call MESSAGE, make[$(MAKELEVEL)]$(if $(_DIR), -C $(_DIR)) $(MAKECMDGOALS)); \
))
$(call MESSAGE, make[$(MAKELEVEL)]$(if $(_DIR), -C $(_DIR)) $(MAKECMDGOALS)); \
))
+ ifneq ($(strip $(_MESSAGE)),)
+ $(info $(_MESSAGE))
+ endif
SUBMAKE=$(MAKE)
else
SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
export QUIET:=1
SUBMAKE=$(MAKE)
else
SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
export QUIET:=1
- 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
+ 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
endif
.SILENT: $(MAKECMDGOALS)
endif
.SILENT: $(MAKECMDGOALS)