* [PATCH] tools/build: Fix -s detection code for new make @ 2023-10-04 13:59 Jiri Olsa 2023-10-06 21:27 ` Jiri Olsa 0 siblings, 1 reply; 3+ messages in thread From: Jiri Olsa @ 2023-10-04 13:59 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet Cc: Dmitry Goncharov, linux-perf-users, bpf, Namhyung Kim, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra As Dmitry described in [1] changelog the current way of detecting -s option is broken for new make. Changing the tools/build -s option detection the same way as it was fixed for root Makefile in [1]. [1] 4bf73588165b ("kbuild: Port silent mode detection to future gnu make.") Cc: Dmitry Goncharov <dgoncharov@users.sf.net> Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/build/Makefile.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build index fac42486a8cf..5fb3fb3d97e0 100644 --- a/tools/build/Makefile.build +++ b/tools/build/Makefile.build @@ -20,7 +20,15 @@ else Q=@ endif -ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) +# 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)) +else +short-opts := $(filter-out --%,$(MAKEFLAGS)) +endif + +ifneq ($(findstring s,$(short-opts)),) quiet=silent_ endif -- 2.41.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/build: Fix -s detection code for new make 2023-10-04 13:59 [PATCH] tools/build: Fix -s detection code for new make Jiri Olsa @ 2023-10-06 21:27 ` Jiri Olsa 2023-10-06 22:15 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 3+ messages in thread From: Jiri Olsa @ 2023-10-06 21:27 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet Cc: Dmitry Goncharov, linux-perf-users, bpf, Namhyung Kim, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Wed, Oct 04, 2023 at 03:59:56PM +0200, Jiri Olsa wrote: > As Dmitry described in [1] changelog the current way of detecting > -s option is broken for new make. > > Changing the tools/build -s option detection the same way as it was > fixed for root Makefile in [1]. > > [1] 4bf73588165b ("kbuild: Port silent mode detection to future gnu make.") > > Cc: Dmitry Goncharov <dgoncharov@users.sf.net> > Signed-off-by: Jiri Olsa <jolsa@kernel.org> we actually need same change in tools/scripts/Makefile.include as well, I'll resend v2 jirka > --- > tools/build/Makefile.build | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build > index fac42486a8cf..5fb3fb3d97e0 100644 > --- a/tools/build/Makefile.build > +++ b/tools/build/Makefile.build > @@ -20,7 +20,15 @@ else > Q=@ > endif > > -ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) > +# 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)) > +else > +short-opts := $(filter-out --%,$(MAKEFLAGS)) > +endif > + > +ifneq ($(findstring s,$(short-opts)),) > quiet=silent_ > endif > > -- > 2.41.0 > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/build: Fix -s detection code for new make 2023-10-06 21:27 ` Jiri Olsa @ 2023-10-06 22:15 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 3+ messages in thread From: Arnaldo Carvalho de Melo @ 2023-10-06 22:15 UTC (permalink / raw) To: Jiri Olsa Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Namhyung Kim, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra Em Fri, Oct 06, 2023 at 11:27:23PM +0200, Jiri Olsa escreveu: > On Wed, Oct 04, 2023 at 03:59:56PM +0200, Jiri Olsa wrote: > > As Dmitry described in [1] changelog the current way of detecting > > -s option is broken for new make. > > > > Changing the tools/build -s option detection the same way as it was > > fixed for root Makefile in [1]. > > > > [1] 4bf73588165b ("kbuild: Port silent mode detection to future gnu make.") > > > > Cc: Dmitry Goncharov <dgoncharov@users.sf.net> > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > we actually need same change in tools/scripts/Makefile.include as well, > I'll resend v2 Thanks, I noticed the change in behaviour and was gegoing thru other grep/sed, egrep, NO_LIBTRACEEVENT, binutils not being installed leading to -1 error in annotation, etc before getting to this, on the way to judiciously test the new default to BUILD_BPF_SKEL=1. I did a quick test and got a familiar output when building perf, please submit v2, v1 is great for me so far :) - Arnaldo > jirka > > > --- > > tools/build/Makefile.build | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build > > index fac42486a8cf..5fb3fb3d97e0 100644 > > --- a/tools/build/Makefile.build > > +++ b/tools/build/Makefile.build > > @@ -20,7 +20,15 @@ else > > Q=@ > > endif > > > > -ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) > > +# 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)) > > +else > > +short-opts := $(filter-out --%,$(MAKEFLAGS)) > > +endif > > + > > +ifneq ($(findstring s,$(short-opts)),) > > quiet=silent_ > > endif > > > > -- > > 2.41.0 > > -- - Arnaldo ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-06 22:15 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-10-04 13:59 [PATCH] tools/build: Fix -s detection code for new make Jiri Olsa 2023-10-06 21:27 ` Jiri Olsa 2023-10-06 22:15 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).