Skip to content

Commit e36aaea

Browse files
Emil Medvemichal42
authored andcommitted
kbuild: Fix silent builds with make-4
make-4 changed the way/order it presents the command line options into MAKEFLAGS In make-3.8x, '-s' would always be first into a group of options with the '-'/hyphen removed $ make -p -s 2>/dev/null | grep ^MAKEFLAGS MAKEFLAGS = sp In make-4, '-s' seems to always be last into a group of options with the '-'/hyphen removed $ make -s -p 2>/dev/null | grep ^MAKEFLAGS MAKEFLAGS = ps Signed-off-by: Emil Medve <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent 7593e09 commit e36aaea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,15 @@ endif
311311
# If the user is running make -s (silent mode), suppress echoing of
312312
# commands
313313

314+
ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
315+
ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
316+
quiet=silent_
317+
endif
318+
else # make-3.8x
314319
ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
315320
quiet=silent_
316321
endif
322+
endif
317323

318324
export quiet Q KBUILD_VERBOSE
319325

0 commit comments

Comments
 (0)