On Sat, Dec 3, 2022 at 12:26 PM Dmitry Goncharov <dgoncharov@xxxxxxxxxxxx> wrote: > > On Thu, Dec 1, 2022 at 6:39 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote: > > You do not need to change the logic in 'else' part, > > but this will work as well. > > Here is the version which keeps the 3.82 specific code intact. > Tested with 3.82, 4.0, 4.3, 4.4, the latest master. Thanks. Could you please send v3 with a commit description? > > regards, Dmitry > > diff --git a/Makefile b/Makefile > index 6f846b1f2618..fbd9ff4a61e7 100644 > --- a/Makefile > +++ b/Makefile > @@ -93,10 +93,17 @@ 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. > > -ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) > - quiet=silent_ > - KBUILD_VERBOSE = 0 > +ifeq ($(filter 3.%,$(MAKE_VERSION)),) > +silence:=$(findstring s,$(firstword -$(MAKEFLAGS))) > +else > +silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS))) > +endif > + > +ifeq ($(silence),s) > +quiet=silent_ > +KBUILD_VERBOSE = 0 > endif > > export quiet Q KBUILD_VERBOSE -- Best Regards Masahiro Yamada