public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8
@ 2023-10-17 18:14 Arnaldo Carvalho de Melo
  2023-10-17 19:02 ` Namhyung Kim
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-10-17 18:14 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Linux Kernel Mailing List

To address this grep 3.8 warning:

  grep: warning: stray \ before #

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 456872ac410df4c0..25d5ccaec22a44fe 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -361,7 +361,7 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT
 ifeq ($(CONFIG_LIBTRACEEVENT),y)
   PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
 else
-  PYTHON_EXT_SRCS := $(shell grep -v '^\#\|util/trace-event.c' util/python-ext-sources)
+  PYTHON_EXT_SRCS := $(shell grep -v '^#\|util/trace-event.c' util/python-ext-sources)
 endif
 
 PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBAPI)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8
  2023-10-17 18:14 [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8 Arnaldo Carvalho de Melo
@ 2023-10-17 19:02 ` Namhyung Kim
  2023-10-20 20:34   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2023-10-17 19:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Linux Kernel Mailing List

Hi Arnaldo,

On Tue, Oct 17, 2023 at 11:15 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> To address this grep 3.8 warning:
>
>   grep: warning: stray \ before #
>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/Makefile.perf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 456872ac410df4c0..25d5ccaec22a44fe 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -361,7 +361,7 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT
>  ifeq ($(CONFIG_LIBTRACEEVENT),y)
>    PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)

Do we need to change it here too?  Otherwise looks good

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


>  else
> -  PYTHON_EXT_SRCS := $(shell grep -v '^\#\|util/trace-event.c' util/python-ext-sources)
> +  PYTHON_EXT_SRCS := $(shell grep -v '^#\|util/trace-event.c' util/python-ext-sources)
>  endif
>
>  PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBAPI)
> --
> 2.41.0
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8
  2023-10-17 19:02 ` Namhyung Kim
@ 2023-10-20 20:34   ` Arnaldo Carvalho de Melo
  2023-10-20 21:15     ` Namhyung Kim
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-10-20 20:34 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Linux Kernel Mailing List

Em Tue, Oct 17, 2023 at 12:02:20PM -0700, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> On Tue, Oct 17, 2023 at 11:15 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > To address this grep 3.8 warning:
> >
> >   grep: warning: stray \ before #
> >
> > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > Cc: Ian Rogers <irogers@google.com>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > ---
> >  tools/perf/Makefile.perf | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> > index 456872ac410df4c0..25d5ccaec22a44fe 100644
> > --- a/tools/perf/Makefile.perf
> > +++ b/tools/perf/Makefile.perf
> > @@ -361,7 +361,7 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT
> >  ifeq ($(CONFIG_LIBTRACEEVENT),y)
> >    PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
> 
> Do we need to change it here too?  Otherwise looks good

I think I did tests and simply removing the \ in this case will comment
out the rest of the line after the #, IIRC we would have to enclose it
in '', like

  PYTHON_EXT_SRCS := $(shell grep -v '^\#' util/python-ext-sources)

But then if it works as-is, why pollute the patch? :-)

In general the less lines you touch in a patch, the better, don't fix
what isn't broken, helps reviewing, etc. :-)

- Arnaldo
 
> Acked-by: Namhyung Kim <namhyung@kernel.org>
> 
> Thanks,
> Namhyung
> 
> 
> >  else
> > -  PYTHON_EXT_SRCS := $(shell grep -v '^\#\|util/trace-event.c' util/python-ext-sources)
> > +  PYTHON_EXT_SRCS := $(shell grep -v '^#\|util/trace-event.c' util/python-ext-sources)
> >  endif
> >
> >  PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBAPI)
> > --
> > 2.41.0
> >

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8
  2023-10-20 20:34   ` Arnaldo Carvalho de Melo
@ 2023-10-20 21:15     ` Namhyung Kim
  2023-10-24 15:12       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2023-10-20 21:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Linux Kernel Mailing List

On Fri, Oct 20, 2023 at 1:34 PM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Tue, Oct 17, 2023 at 12:02:20PM -0700, Namhyung Kim escreveu:
> > Hi Arnaldo,
> >
> > On Tue, Oct 17, 2023 at 11:15 AM Arnaldo Carvalho de Melo
> > <acme@kernel.org> wrote:
> > >
> > > To address this grep 3.8 warning:
> > >
> > >   grep: warning: stray \ before #
> > >
> > > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > > Cc: Ian Rogers <irogers@google.com>
> > > Cc: Jiri Olsa <jolsa@kernel.org>
> > > Cc: Namhyung Kim <namhyung@kernel.org>
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > ---
> > >  tools/perf/Makefile.perf | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> > > index 456872ac410df4c0..25d5ccaec22a44fe 100644
> > > --- a/tools/perf/Makefile.perf
> > > +++ b/tools/perf/Makefile.perf
> > > @@ -361,7 +361,7 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT
> > >  ifeq ($(CONFIG_LIBTRACEEVENT),y)
> > >    PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
> >
> > Do we need to change it here too?  Otherwise looks good
>
> I think I did tests and simply removing the \ in this case will comment
> out the rest of the line after the #, IIRC we would have to enclose it
> in '', like
>
>   PYTHON_EXT_SRCS := $(shell grep -v '^\#' util/python-ext-sources)
>
> But then if it works as-is, why pollute the patch? :-)
>
> In general the less lines you touch in a patch, the better, don't fix
> what isn't broken, helps reviewing, etc. :-)

Agreed, thanks!
Namhyung

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8
  2023-10-20 21:15     ` Namhyung Kim
@ 2023-10-24 15:12       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-10-24 15:12 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Linux Kernel Mailing List

Em Fri, Oct 20, 2023 at 02:15:03PM -0700, Namhyung Kim escreveu:
> On Fri, Oct 20, 2023 at 1:34 PM Arnaldo Carvalho de Melo > <acme@kernel.org> wrote:
> > Em Tue, Oct 17, 2023 at 12:02:20PM -0700, Namhyung Kim escreveu:
> > > On Tue, Oct 17, 2023 at 11:15 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > > To address this grep 3.8 warning:

> > > >   grep: warning: stray \ before #

> > > > +++ b/tools/perf/Makefile.perf
> > > > @@ -361,7 +361,7 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT
> > > >  ifeq ($(CONFIG_LIBTRACEEVENT),y)
> > > >    PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)

> > > Do we need to change it here too?  Otherwise looks good

> > I think I did tests and simply removing the \ in this case will comment
> > out the rest of the line after the #, IIRC we would have to enclose it
> > in '', like
> >
> >   PYTHON_EXT_SRCS := $(shell grep -v '^\#' util/python-ext-sources)
> >
> > But then if it works as-is, why pollute the patch? :-)
> >
> > In general the less lines you touch in a patch, the better, don't fix
> > what isn't broken, helps reviewing, etc. :-)
> 
> Agreed, thanks!
> Namhyung

But while this makes it build in newer systems, it breaks on older ones:

Makefile.perf:364: *** unterminated call to function 'shell': missing ')'.  Stop.
make[1]: *** [Makefile.perf:242: sub-make] Error 2
make: *** [Makefile:70: all] Error 2
make: Leaving directory '/git/perf-6.6.0-rc1/tools/perf'
+ exit 1
[perfbuilder@five ~]$ dsh opensuse:15.4
sh-4.4$ rpm -q grep make
grep-3.1-150000.4.6.1.x86_64
make-4.2.1-7.3.2.x86_64
sh-4.4$

Makefile.perf:364: *** unterminated call to function 'shell': missing ')'.  Stop.
make[1]: *** [Makefile.perf:242: sub-make] Error 2
make: *** [Makefile:70: all] Error 2
make: Leaving directory '/git/perf-6.6.0-rc1/tools/perf'
+ exit 1
[perfbuilder@five ~]$ dsh ubuntu:20.04
$ dpkg -l make grep
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  grep           3.4-1        amd64        GNU grep, egrep and fgrep
ii  make           4.2.1-1.2    amd64        utility for directing compilation
$

Both these containers don't have libtraceevent-devel installed (not
available).

:-\

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-24 15:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 18:14 [PATCH] perf build: Remove stray '\' before that is warned about since grep 3.8 Arnaldo Carvalho de Melo
2023-10-17 19:02 ` Namhyung Kim
2023-10-20 20:34   ` Arnaldo Carvalho de Melo
2023-10-20 21:15     ` Namhyung Kim
2023-10-24 15:12       ` 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