* [PATCHv2 0/2] tools/build: Fix -s detection code for new make @ 2023-10-08 21:22 Jiri Olsa 2023-10-08 21:22 ` [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build Jiri Olsa ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Jiri Olsa @ 2023-10-08 21:22 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet Cc: 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 hi, this fixes the detection of silent flag for newer make. It'd be better to re-use the code, but I don't see simple way without more refactoring. I put that on my todo list. v2 changes: - adding the change for tools/scripts/Makefile.include as well thanks, jirka --- Jiri Olsa (2): tools/build: Fix -s detection code in tools/build/Makefile.build tools/build: Fix -s detection code in tools/scripts/Makefile.include tools/build/Makefile.build | 10 +++++++++- tools/scripts/Makefile.include | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-08 21:22 [PATCHv2 0/2] tools/build: Fix -s detection code for new make Jiri Olsa @ 2023-10-08 21:22 ` Jiri Olsa 2023-10-13 3:57 ` Namhyung Kim 2023-10-08 21:22 ` [PATCHv2 2/2] tools/build: Fix -s detection code in tools/scripts/Makefile.include Jiri Olsa 2023-10-10 13:01 ` [PATCHv2 0/2] tools/build: Fix -s detection code for new make Arnaldo Carvalho de Melo 2 siblings, 1 reply; 12+ messages in thread From: Jiri Olsa @ 2023-10-08 21:22 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] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-08 21:22 ` [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build Jiri Olsa @ 2023-10-13 3:57 ` Namhyung Kim 2023-10-13 6:37 ` Jiri Olsa 0 siblings, 1 reply; 12+ messages in thread From: Namhyung Kim @ 2023-10-13 3:57 UTC (permalink / raw) To: Jiri Olsa Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra Hi Jiri, On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > As Dmitry described in [1] changelog the current way of detecting > -s option is broken for new make. I'm not sure what -s option does for perf (at least). It doesn't seem much different whether I give it or not. Am I missing something? Thanks, Namhyung > > 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 [flat|nested] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-13 3:57 ` Namhyung Kim @ 2023-10-13 6:37 ` Jiri Olsa 2023-10-17 1:36 ` Namhyung Kim 0 siblings, 1 reply; 12+ messages in thread From: Jiri Olsa @ 2023-10-13 6:37 UTC (permalink / raw) To: Namhyung Kim Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Thu, Oct 12, 2023 at 08:57:33PM -0700, Namhyung Kim wrote: > Hi Jiri, > > On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > > > As Dmitry described in [1] changelog the current way of detecting > > -s option is broken for new make. > > I'm not sure what -s option does for perf (at least). > It doesn't seem much different whether I give it or not. > Am I missing something? what's your make version? the wrong output is visible when running with make version > 4.4 .. basicaly the -s is wrongly detected and you either get no output at all from some builds or overly verbose output it's mentioned in the [1] commit changelog, I can put it to the changelog in new version jirka > > Thanks, > Namhyung > > > > > 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 [flat|nested] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-13 6:37 ` Jiri Olsa @ 2023-10-17 1:36 ` Namhyung Kim 2023-10-17 8:43 ` Jiri Olsa 0 siblings, 1 reply; 12+ messages in thread From: Namhyung Kim @ 2023-10-17 1:36 UTC (permalink / raw) To: Jiri Olsa Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Thu, Oct 12, 2023 at 11:37 PM Jiri Olsa <olsajiri@gmail.com> wrote: > > On Thu, Oct 12, 2023 at 08:57:33PM -0700, Namhyung Kim wrote: > > Hi Jiri, > > > > On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > > > > > As Dmitry described in [1] changelog the current way of detecting > > > -s option is broken for new make. > > > > I'm not sure what -s option does for perf (at least). > > It doesn't seem much different whether I give it or not. > > Am I missing something? > > what's your make version? the wrong output is visible when running > with make version > 4.4 .. basicaly the -s is wrongly detected and > you either get no output at all from some builds or overly verbose > output > > it's mentioned in the [1] commit changelog, I can put it to the > changelog in new version IIUC it's about detecting `make -s` properly and not being confused by `make a=s` or something. I'm not objecting on it but I don't see what `make -s` does actually. Anyway, my make version is 4.3. Thanks, Namhyung ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-17 1:36 ` Namhyung Kim @ 2023-10-17 8:43 ` Jiri Olsa 2023-10-17 20:16 ` Namhyung Kim 0 siblings, 1 reply; 12+ messages in thread From: Jiri Olsa @ 2023-10-17 8:43 UTC (permalink / raw) To: Namhyung Kim Cc: Jiri Olsa, Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Mon, Oct 16, 2023 at 06:36:10PM -0700, Namhyung Kim wrote: > On Thu, Oct 12, 2023 at 11:37 PM Jiri Olsa <olsajiri@gmail.com> wrote: > > > > On Thu, Oct 12, 2023 at 08:57:33PM -0700, Namhyung Kim wrote: > > > Hi Jiri, > > > > > > On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > > > > > > > As Dmitry described in [1] changelog the current way of detecting > > > > -s option is broken for new make. > > > > > > I'm not sure what -s option does for perf (at least). > > > It doesn't seem much different whether I give it or not. > > > Am I missing something? > > > > what's your make version? the wrong output is visible when running > > with make version > 4.4 .. basicaly the -s is wrongly detected and > > you either get no output at all from some builds or overly verbose > > output > > > > it's mentioned in the [1] commit changelog, I can put it to the > > changelog in new version > > IIUC it's about detecting `make -s` properly and not being confused > by `make a=s` or something. I'm not objecting on it but I don't see > what `make -s` does actually. so the tools/build/Makefile.build and tools/scripts/Makefile.include detect make -s option, which puts make into silent mode, so both makefiles switch off the output by setting quiet=silent_ or silent=1 the problem is that the detection of make -s option changed in make > 4.4 and current code could be tricked to switch to silent mode just by having 's' persent on the command line, like with 'a=s' jirka > > Anyway, my make version is 4.3. > > Thanks, > Namhyung ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-17 8:43 ` Jiri Olsa @ 2023-10-17 20:16 ` Namhyung Kim 2023-10-18 7:21 ` Jiri Olsa 0 siblings, 1 reply; 12+ messages in thread From: Namhyung Kim @ 2023-10-17 20:16 UTC (permalink / raw) To: Jiri Olsa Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Tue, Oct 17, 2023 at 1:43 AM Jiri Olsa <olsajiri@gmail.com> wrote: > > On Mon, Oct 16, 2023 at 06:36:10PM -0700, Namhyung Kim wrote: > > On Thu, Oct 12, 2023 at 11:37 PM Jiri Olsa <olsajiri@gmail.com> wrote: > > > > > > On Thu, Oct 12, 2023 at 08:57:33PM -0700, Namhyung Kim wrote: > > > > Hi Jiri, > > > > > > > > On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > > > > > > > > > As Dmitry described in [1] changelog the current way of detecting > > > > > -s option is broken for new make. > > > > > > > > I'm not sure what -s option does for perf (at least). > > > > It doesn't seem much different whether I give it or not. > > > > Am I missing something? > > > > > > what's your make version? the wrong output is visible when running > > > with make version > 4.4 .. basicaly the -s is wrongly detected and > > > you either get no output at all from some builds or overly verbose > > > output > > > > > > it's mentioned in the [1] commit changelog, I can put it to the > > > changelog in new version > > > > IIUC it's about detecting `make -s` properly and not being confused > > by `make a=s` or something. I'm not objecting on it but I don't see > > what `make -s` does actually. > > so the tools/build/Makefile.build and tools/scripts/Makefile.include detect > make -s option, which puts make into silent mode, so both makefiles switch > off the output by setting quiet=silent_ or silent=1 > > the problem is that the detection of make -s option changed in make > 4.4 > and current code could be tricked to switch to silent mode just by having > 's' persent on the command line, like with 'a=s' I think our talk is circulating :-). Anyway I'm ok with the change, so Acked-by: Namhyung Kim <namhyung@kernel.org> Which tree do you want to route it? Thanks, Namhyung ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-17 20:16 ` Namhyung Kim @ 2023-10-18 7:21 ` Jiri Olsa 2023-10-18 22:29 ` Namhyung Kim 0 siblings, 1 reply; 12+ messages in thread From: Jiri Olsa @ 2023-10-18 7:21 UTC (permalink / raw) To: Namhyung Kim Cc: Jiri Olsa, Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Tue, Oct 17, 2023 at 01:16:28PM -0700, Namhyung Kim wrote: > On Tue, Oct 17, 2023 at 1:43 AM Jiri Olsa <olsajiri@gmail.com> wrote: > > > > On Mon, Oct 16, 2023 at 06:36:10PM -0700, Namhyung Kim wrote: > > > On Thu, Oct 12, 2023 at 11:37 PM Jiri Olsa <olsajiri@gmail.com> wrote: > > > > > > > > On Thu, Oct 12, 2023 at 08:57:33PM -0700, Namhyung Kim wrote: > > > > > Hi Jiri, > > > > > > > > > > On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > > > > > > > > > > > As Dmitry described in [1] changelog the current way of detecting > > > > > > -s option is broken for new make. > > > > > > > > > > I'm not sure what -s option does for perf (at least). > > > > > It doesn't seem much different whether I give it or not. > > > > > Am I missing something? > > > > > > > > what's your make version? the wrong output is visible when running > > > > with make version > 4.4 .. basicaly the -s is wrongly detected and > > > > you either get no output at all from some builds or overly verbose > > > > output > > > > > > > > it's mentioned in the [1] commit changelog, I can put it to the > > > > changelog in new version > > > > > > IIUC it's about detecting `make -s` properly and not being confused > > > by `make a=s` or something. I'm not objecting on it but I don't see > > > what `make -s` does actually. > > > > so the tools/build/Makefile.build and tools/scripts/Makefile.include detect > > make -s option, which puts make into silent mode, so both makefiles switch > > off the output by setting quiet=silent_ or silent=1 > > > > the problem is that the detection of make -s option changed in make > 4.4 > > and current code could be tricked to switch to silent mode just by having > > 's' persent on the command line, like with 'a=s' > > I think our talk is circulating :-). Anyway I'm ok with the change, so :) ok, thanks > > Acked-by: Namhyung Kim <namhyung@kernel.org> > > Which tree do you want to route it? I think perf tree is the best one to route it thanks, jirka ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-18 7:21 ` Jiri Olsa @ 2023-10-18 22:29 ` Namhyung Kim 0 siblings, 0 replies; 12+ messages in thread From: Namhyung Kim @ 2023-10-18 22:29 UTC (permalink / raw) To: Jiri Olsa Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, Dmitry Goncharov, linux-perf-users, bpf, 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 18, 2023 at 12:21 AM Jiri Olsa <olsajiri@gmail.com> wrote: > > On Tue, Oct 17, 2023 at 01:16:28PM -0700, Namhyung Kim wrote: > > On Tue, Oct 17, 2023 at 1:43 AM Jiri Olsa <olsajiri@gmail.com> wrote: > > > > > > On Mon, Oct 16, 2023 at 06:36:10PM -0700, Namhyung Kim wrote: > > > > On Thu, Oct 12, 2023 at 11:37 PM Jiri Olsa <olsajiri@gmail.com> wrote: > > > > > > > > > > On Thu, Oct 12, 2023 at 08:57:33PM -0700, Namhyung Kim wrote: > > > > > > Hi Jiri, > > > > > > > > > > > > On Sun, Oct 8, 2023 at 2:23 PM Jiri Olsa <jolsa@kernel.org> wrote: > > > > > > > > > > > > > > As Dmitry described in [1] changelog the current way of detecting > > > > > > > -s option is broken for new make. > > > > > > > > > > > > I'm not sure what -s option does for perf (at least). > > > > > > It doesn't seem much different whether I give it or not. > > > > > > Am I missing something? > > > > > > > > > > what's your make version? the wrong output is visible when running > > > > > with make version > 4.4 .. basicaly the -s is wrongly detected and > > > > > you either get no output at all from some builds or overly verbose > > > > > output > > > > > > > > > > it's mentioned in the [1] commit changelog, I can put it to the > > > > > changelog in new version > > > > > > > > IIUC it's about detecting `make -s` properly and not being confused > > > > by `make a=s` or something. I'm not objecting on it but I don't see > > > > what `make -s` does actually. > > > > > > so the tools/build/Makefile.build and tools/scripts/Makefile.include detect > > > make -s option, which puts make into silent mode, so both makefiles switch > > > off the output by setting quiet=silent_ or silent=1 > > > > > > the problem is that the detection of make -s option changed in make > 4.4 > > > and current code could be tricked to switch to silent mode just by having > > > 's' persent on the command line, like with 'a=s' > > > > I think our talk is circulating :-). Anyway I'm ok with the change, so > > :) ok, thanks > > > > > Acked-by: Namhyung Kim <namhyung@kernel.org> > > > > Which tree do you want to route it? > > I think perf tree is the best one to route it Ok, I'll add it. Thanks, Namhyung ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCHv2 2/2] tools/build: Fix -s detection code in tools/scripts/Makefile.include 2023-10-08 21:22 [PATCHv2 0/2] tools/build: Fix -s detection code for new make Jiri Olsa 2023-10-08 21:22 ` [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build Jiri Olsa @ 2023-10-08 21:22 ` Jiri Olsa 2023-10-10 13:01 ` [PATCHv2 0/2] tools/build: Fix -s detection code for new make Arnaldo Carvalho de Melo 2 siblings, 0 replies; 12+ messages in thread From: Jiri Olsa @ 2023-10-08 21:22 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/scripts/Makefile.include | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index ff527ac065cf..6fba29f3222d 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -136,7 +136,15 @@ else NO_SUBDIR = : 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)),) silent=1 endif -- 2.41.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCHv2 0/2] tools/build: Fix -s detection code for new make 2023-10-08 21:22 [PATCHv2 0/2] tools/build: Fix -s detection code for new make Jiri Olsa 2023-10-08 21:22 ` [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build Jiri Olsa 2023-10-08 21:22 ` [PATCHv2 2/2] tools/build: Fix -s detection code in tools/scripts/Makefile.include Jiri Olsa @ 2023-10-10 13:01 ` Arnaldo Carvalho de Melo 2023-10-20 5:38 ` Namhyung Kim 2 siblings, 1 reply; 12+ messages in thread From: Arnaldo Carvalho de Melo @ 2023-10-10 13:01 UTC (permalink / raw) To: Jiri Olsa Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, 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 Sun, Oct 08, 2023 at 11:22:49PM +0200, Jiri Olsa escreveu: > hi, > this fixes the detection of silent flag for newer make. > > It'd be better to re-use the code, but I don't see simple > way without more refactoring. I put that on my todo list. > > v2 changes: > - adding the change for tools/scripts/Makefile.include as well Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> - Arnaldo > thanks, > jirka > > > --- > Jiri Olsa (2): > tools/build: Fix -s detection code in tools/build/Makefile.build > tools/build: Fix -s detection code in tools/scripts/Makefile.include > > tools/build/Makefile.build | 10 +++++++++- > tools/scripts/Makefile.include | 10 +++++++++- > 2 files changed, 18 insertions(+), 2 deletions(-) -- - Arnaldo ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCHv2 0/2] tools/build: Fix -s detection code for new make 2023-10-10 13:01 ` [PATCHv2 0/2] tools/build: Fix -s detection code for new make Arnaldo Carvalho de Melo @ 2023-10-20 5:38 ` Namhyung Kim 0 siblings, 0 replies; 12+ messages in thread From: Namhyung Kim @ 2023-10-20 5:38 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Jiri Olsa, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Quentin Monnet, linux-perf-users, bpf, Alexander Shishkin, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend, Ian Rogers, KP Singh, Stanislav Fomichev, Hao Luo, Ingo Molnar, Peter Zijlstra On Tue, Oct 10, 2023 at 6:01 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > Em Sun, Oct 08, 2023 at 11:22:49PM +0200, Jiri Olsa escreveu: > > hi, > > this fixes the detection of silent flag for newer make. > > > > It'd be better to re-use the code, but I don't see simple > > way without more refactoring. I put that on my todo list. > > > > v2 changes: > > - adding the change for tools/scripts/Makefile.include as well > > Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Applied to perf-tools-next, thanks! ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-10-20 5:38 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-10-08 21:22 [PATCHv2 0/2] tools/build: Fix -s detection code for new make Jiri Olsa 2023-10-08 21:22 ` [PATCHv2 1/2] tools/build: Fix -s detection code in tools/build/Makefile.build Jiri Olsa 2023-10-13 3:57 ` Namhyung Kim 2023-10-13 6:37 ` Jiri Olsa 2023-10-17 1:36 ` Namhyung Kim 2023-10-17 8:43 ` Jiri Olsa 2023-10-17 20:16 ` Namhyung Kim 2023-10-18 7:21 ` Jiri Olsa 2023-10-18 22:29 ` Namhyung Kim 2023-10-08 21:22 ` [PATCHv2 2/2] tools/build: Fix -s detection code in tools/scripts/Makefile.include Jiri Olsa 2023-10-10 13:01 ` [PATCHv2 0/2] tools/build: Fix -s detection code for new make Arnaldo Carvalho de Melo 2023-10-20 5:38 ` Namhyung Kim
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).