Skip to content

Commit

Permalink
verbose.mk: print ERROR messages in non-verbose
Browse files Browse the repository at this point in the history
Using `make -j9` only prints a subset of messages to follow the build
process progressing. However this silently skips over errors which might
be of interested. Using `make V=s` easily floods the terminal making it
hard to find error messages between the lines.

A compromise is the usage of `$(call ERROR_MESSAGE,...)` which prints a
message in red. This function is silenced in the non-verbose mode, even
if only used at a single place in `package/Makefile` where it notifies
about a OPKG corner case.

This commit moves the `ERROR_MESSAGE` definition outside of the
`OPENWRT_VERBOSE` condition and print error messages in every mode.

With this in place further error messages are possible.

Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Feb 28, 2022
1 parent d4c20ff commit aee3594
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions include/verbose.mk
Expand Up @@ -29,15 +29,15 @@ ifeq ($(IS_TTY),1)
endif
endif

define ERROR_MESSAGE
printf "$(_R)%s$(_N)\n" "$(1)" >&8
endef

ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
define MESSAGE
printf "$(_Y)%s$(_N)\n" "$(1)" >&8
endef

define ERROR_MESSAGE
printf "$(_R)%s$(_N)\n" "$(1)" >&8
endef

ifeq ($(QUIET),1)
ifneq ($(CURDIR),$(TOPDIR))
_DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
Expand All @@ -60,5 +60,4 @@ else
define MESSAGE
printf "%s\n" "$(1)"
endef
ERROR_MESSAGE=$(MESSAGE)
endif

0 comments on commit aee3594

Please sign in to comment.