Skip to content

Commit

Permalink
Revert "verbose.mk: print ERROR messages in non-verbose"
Browse files Browse the repository at this point in the history
This reverts commit aee3594 as it breaks
existing uses of '$(call ERROR_MESSAGE,...)' during verbose builds. For
example, 'Build/check-size' doesn't print error messages on failed checks,
rather the printing itself fails with:

     bash: line 1: 8: Bad file descriptor

This happens because the commit doesn't properly handle shell redirects
across makes/submakes during the build process, and later attempts to fix
this showed the problem isn't trivial.

Signed-off-by: Tony Ambardar <[email protected]>
  • Loading branch information
guidosarducci committed Nov 15, 2023
1 parent 9ae2484 commit 23b3c70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/verbose.mk
Original file line number Diff line number Diff line change
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,4 +60,5 @@ else
define MESSAGE
printf "%s\n" "$(1)"
endef
ERROR_MESSAGE=$(MESSAGE)
endif

0 comments on commit 23b3c70

Please sign in to comment.