Skip to contentSkip to conversation

perf build: Fix unescaped # in perf build-test

PATCH Applied James Clark 2 participants 2 messages Apr 25, 2023 – Apr 29, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf build: Fix unescaped # in perf build-test

With the following bash and make versions:

  $ make --version
  GNU Make 4.2.1
  Built for aarch64-unknown-linux-gnu
  $ bash --version
  GNU bash, version 5.0.17(1)-release (aarch64-unknown-linux-gnu)

This error is encountered when running the build-test target:

  $ make -C tools/perf build-test
  tests/make:181: *** unterminated call to function 'shell': missing ')'.  Stop.
  make: *** [Makefile:103: build-test] Error 2

Fix it by escaping the # which was causing make to interpret the rest of the line as a comment leaving the unclosed opening bracket.

Fixes 56d5229471ee ("tools build: Pass libbpf feature only if libbpf 1.0+")
---
 tools/perf/tests/make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/make +1 -1
index d75876126631..8dd3f8090352 100644
@@ -178,7 +178,7 @@ run += make_install_prefix_slash
 # run += make_install_pdf
 run += make_minimal
 
-old_libbpf := $(shell echo "#include <bpf/libbpf.h>" | $(CC) -E -dM -x c -| egrep -q "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
+old_libbpf := $(shell echo '\#include <bpf/libbpf.h>' | $(CC) -E -dM -x c -| egrep -q "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
 
 ifneq ($(old_libbpf),)
 run += make_libbpf_dynamic
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw

Em Tue, Apr 25, 2023 at 11:44:13AM +0100, James Clark escreveu:

Quoted 10 lines

With the following bash and make versions:

  $ make --version
  GNU Make 4.2.1
  Built for aarch64-unknown-linux-gnu
  $ bash --version
  GNU bash, version 5.0.17(1)-release (aarch64-unknown-linux-gnu)

This error is encountered when running the build-test target:

Thanks, applied.

- Arnaldo

Quoted 29 lines
  $ make -C tools/perf build-test
  tests/make:181: *** unterminated call to function 'shell': missing ')'.  Stop.
  make: *** [Makefile:103: build-test] Error 2

Fix it by escaping the # which was causing make to interpret the rest of the line as a comment leaving the unclosed opening bracket.

Fixes 56d5229471ee ("tools build: Pass libbpf feature only if libbpf 1.0+")
---
 tools/perf/tests/make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/make +1 -1
index d75876126631..8dd3f8090352 100644
@@ -178,7 +178,7 @@ run += make_install_prefix_slash
 # run += make_install_pdf
 run += make_minimal
 
-old_libbpf := $(shell echo "#include <bpf/libbpf.h>" | $(CC) -E -dM -x c -| egrep -q "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
+old_libbpf := $(shell echo '\#include <bpf/libbpf.h>' | $(CC) -E -dM -x c -| egrep -q "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
 
 ifneq ($(old_libbpf),)
 run += make_libbpf_dynamic
Signature · 1 line
2.34.1
Signature · 1 line
- Arnaldo