[PATCH] tools/build: Skip jobserver flgas in -s detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently there is unnecessarily verbose output:

    $ make -j8 bzImage
    mkdir -p /home/dlxu/dev/linux/tools/objtool && make
      O=/home/dlxu/dev/linux subdir=tools/objtool --no-print-directory -C
      objtool
    mkdir -p /home/dlxu/dev/linux/tools/bpf/resolve_btfids && make
      O=/home/dlxu/dev/linux subdir=tools/bpf/resolve_btfids
      --no-print-directory -C bpf/resolve_btfids
      INSTALL libsubcmd_headers
      INSTALL libsubcmd_headers
      UPD     include/config/kernel.release

The reason this happens is that it seems that make is internally adding
the following flag to $(MAKEFLAGS):

    ---jobserver-auth=fifo:/tmp/GMfifo1880691

This breaks -s detection which searches for 's' in $(short-opts), as any
this entire long flag is treated as a short flag and the presence of any
's' triggers silent=1.

Fix by filtering out such flags so it's still correct to do a substring
search for 's'.

Signed-off-by: Daniel Xu <dxu@xxxxxxxxx>
---
 tools/scripts/Makefile.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 0aa4005017c7..a413f73a7856 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -139,9 +139,9 @@ endif
 # If the user is running make -s (silent mode), suppress echoing of commands
 # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
 ifeq ($(filter 3.%,$(MAKE_VERSION)),)
-short-opts := $(firstword -$(MAKEFLAGS))
+short-opts := $(filter-out ---%,$(firstword -$(MAKEFLAGS)))
 else
-short-opts := $(filter-out --%,$(MAKEFLAGS))
+short-opts := $(filter-out --% ---%,$(MAKEFLAGS))
 endif
 
 ifneq ($(findstring s,$(short-opts)),)
-- 
2.47.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux