mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
perf build: Support python/perf.so testing
Add a build target to echo the python/perf.so's name from Makefile.perf. Use it in tests/make so the correct target is built and tested for. Fixes: caec54705adb73b0 ("perf build: Fix python/perf.so library's name") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andres Freund <andres@anarazel.de> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin Liška <mliska@suse.cz> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Pavithra Gurushankar <gpavithrasha@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Monnet <quentin@isovalent.com> Cc: Roberto Sassu <roberto.sassu@huawei.com> Cc: Stephane Eranian <eranian@google.com> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Cc: Tom Rix <trix@redhat.com> Cc: Yang Jihong <yangjihong1@huawei.com> Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
6bebc06d54
commit
7a9b223ca0
@ -647,13 +647,16 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
|
|||||||
# Create python binding output directory if not already present
|
# Create python binding output directory if not already present
|
||||||
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
|
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
|
||||||
|
|
||||||
$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX): $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBPERF)
|
$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX): $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBPERF) $(LIBSUBCMD)
|
||||||
$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
|
$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
|
||||||
CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \
|
CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \
|
||||||
$(PYTHON_WORD) util/setup.py \
|
$(PYTHON_WORD) util/setup.py \
|
||||||
--quiet build_ext; \
|
--quiet build_ext; \
|
||||||
cp $(PYTHON_EXTBUILD_LIB)perf*.so $(OUTPUT)python/
|
cp $(PYTHON_EXTBUILD_LIB)perf*.so $(OUTPUT)python/
|
||||||
|
|
||||||
|
python_perf_target:
|
||||||
|
@echo "Target is: $(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX)"
|
||||||
|
|
||||||
please_set_SHELL_PATH_to_a_more_modern_shell:
|
please_set_SHELL_PATH_to_a_more_modern_shell:
|
||||||
$(Q)$$(:)
|
$(Q)$$(:)
|
||||||
|
|
||||||
@ -1152,7 +1155,7 @@ FORCE:
|
|||||||
.PHONY: all install clean config-clean strip install-gtk
|
.PHONY: all install clean config-clean strip install-gtk
|
||||||
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
||||||
.PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope FORCE prepare
|
.PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope FORCE prepare
|
||||||
.PHONY: archheaders
|
.PHONY: archheaders python_perf_target
|
||||||
|
|
||||||
endif # force_fixdep
|
endif # force_fixdep
|
||||||
|
|
||||||
|
@ -62,10 +62,11 @@ lib = lib
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
has = $(shell which $1 2>/dev/null)
|
has = $(shell which $1 2>/dev/null)
|
||||||
|
python_perf_so := $(shell $(MAKE) python_perf_target|grep "Target is:"|awk '{print $$3}')
|
||||||
|
|
||||||
# standard single make variable specified
|
# standard single make variable specified
|
||||||
make_clean_all := clean all
|
make_clean_all := clean all
|
||||||
make_python_perf_so := python/perf.so
|
make_python_perf_so := $(python_perf_so)
|
||||||
make_debug := DEBUG=1
|
make_debug := DEBUG=1
|
||||||
make_no_libperl := NO_LIBPERL=1
|
make_no_libperl := NO_LIBPERL=1
|
||||||
make_no_libpython := NO_LIBPYTHON=1
|
make_no_libpython := NO_LIBPYTHON=1
|
||||||
@ -209,7 +210,7 @@ test_make_doc := $(test_ok)
|
|||||||
test_make_help_O := $(test_ok)
|
test_make_help_O := $(test_ok)
|
||||||
test_make_doc_O := $(test_ok)
|
test_make_doc_O := $(test_ok)
|
||||||
|
|
||||||
test_make_python_perf_so := test -f $(PERF_O)/python/perf.so
|
test_make_python_perf_so := test -f $(PERF_O)/$(python_perf_so)
|
||||||
|
|
||||||
test_make_perf_o := test -f $(PERF_O)/perf.o
|
test_make_perf_o := test -f $(PERF_O)/perf.o
|
||||||
test_make_util_map_o := test -f $(PERF_O)/util/map.o
|
test_make_util_map_o := test -f $(PERF_O)/util/map.o
|
||||||
|
Loading…
x
Reference in New Issue
Block a user