linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: "Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Tom Rix" <trix@redhat.com>,
	"Roberto Sassu" <roberto.sassu@huawei.com>,
	"Quentin Monnet" <quentin@isovalent.com>,
	"Andres Freund" <andres@anarazel.de>,
	"Tiezhu Yang" <yangtiezhu@loongson.cn>,
	"Pavithra Gurushankar" <gpavithrasha@gmail.com>,
	"Yang Jihong" <yangjihong1@huawei.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Leo Yan" <leo.yan@linaro.org>, "Martin Liška" <mliska@suse.cz>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	llvm@lists.linux.dev
Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com>
Subject: [PATCH v1 01/13] perf build: Support python/perf.so testing
Date: Fri, 10 Mar 2023 22:57:41 -0800	[thread overview]
Message-ID: <20230311065753.3012826-2-irogers@google.com> (raw)
In-Reply-To: <20230311065753.3012826-1-irogers@google.com>

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: caec54705adb ("perf build: Fix python/perf.so library's name")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/Makefile.perf | 7 +++++--
 tools/perf/tests/make    | 5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index bac9272682b7..2fcee585b225 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -647,13 +647,16 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
 # Create python binding output directory if not already present
 _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" \
         CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \
 	  $(PYTHON_WORD) util/setup.py \
 	  --quiet build_ext; \
 	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:
 	$(Q)$$(:)
 
@@ -1152,7 +1155,7 @@ FORCE:
 .PHONY: all install clean config-clean strip install-gtk
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
 .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope FORCE prepare
-.PHONY: archheaders
+.PHONY: archheaders python_perf_target
 
 endif # force_fixdep
 
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 009d6efb673c..deb37fb982e9 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -62,10 +62,11 @@ lib = lib
 endif
 
 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
 make_clean_all      := clean all
-make_python_perf_so := python/perf.so
+make_python_perf_so := $(python_perf_so)
 make_debug          := DEBUG=1
 make_no_libperl     := NO_LIBPERL=1
 make_no_libpython   := NO_LIBPYTHON=1
@@ -204,7 +205,7 @@ test_make_doc    := $(test_ok)
 test_make_help_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_util_map_o       := test -f $(PERF_O)/util/map.o
-- 
2.40.0.rc1.284.g88254d51c5-goog


  reply	other threads:[~2023-03-11  6:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11  6:57 [PATCH v1 00/13] Perf tool build improvements Ian Rogers
2023-03-11  6:57 ` Ian Rogers [this message]
2023-03-11  6:57 ` [PATCH v1 02/13] perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL Ian Rogers
2023-03-13 20:19   ` Arnaldo Carvalho de Melo
2023-03-13 20:27     ` Ian Rogers
2023-03-13 20:34       ` Arnaldo Carvalho de Melo
2023-03-13 20:59         ` Arnaldo Carvalho de Melo
2023-03-13 21:05           ` Arnaldo Carvalho de Melo
2023-03-11  6:57 ` [PATCH v1 03/13] perf build: Remove unused HAVE_GLIBC_SUPPORT Ian Rogers
2023-03-11  6:57 ` [PATCH v1 04/13] perf build: Error if no libelf and NO_LIBELF isn't set Ian Rogers
2023-03-13 19:45   ` Arnaldo Carvalho de Melo
2023-03-13 20:18     ` Ian Rogers
2023-03-11  6:57 ` [PATCH v1 05/13] perf util: Remove weak sched_getcpu Ian Rogers
2023-03-11  6:57 ` [PATCH v1 06/13] perf build: Error if jevents won't work and NO_JEVENTS=1 isn't set Ian Rogers
2023-03-11  6:57 ` [PATCH v1 07/13] perf build: Make binutil libraries opt in Ian Rogers
2023-03-13 19:37   ` Arnaldo Carvalho de Melo
2023-03-11  6:57 ` [PATCH v1 08/13] tools build: Add feature test for abi::__cxa_demangle Ian Rogers
2023-03-11  6:57 ` [PATCH v1 09/13] perf symbol: Add abi::__cxa_demangle C++ demangling support Ian Rogers
2023-03-30 14:08   ` James Clark
2023-03-30 16:50     ` Ian Rogers
2023-03-30 19:03       ` Ian Rogers
2023-03-31  9:27         ` James Clark
2023-03-11  6:57 ` [PATCH v1 10/13] perf build: Switch libpfm4 to opt-out rather than opt-in Ian Rogers
2023-03-11  6:57 ` [PATCH v1 11/13] perf build: If libtraceevent isn't present error the build Ian Rogers
2023-03-11  6:57 ` [PATCH v1 12/13] tools headers: Make the difference output easier to read Ian Rogers
2023-03-13 19:35   ` Arnaldo Carvalho de Melo
2023-03-13 20:14     ` Ian Rogers
2023-03-11  6:57 ` [PATCH v1 13/13] perf build: Remove redundant NO_NEWT build option Ian Rogers
2023-03-14 12:11 ` [PATCH v1 00/13] Perf tool build improvements Arnaldo Carvalho de Melo
2023-03-14 12:12   ` Arnaldo Carvalho de Melo
2023-03-14 12:27     ` Arnaldo Carvalho de Melo
2023-03-14 12:29       ` Arnaldo Carvalho de Melo
2023-03-14 12:21   ` Adrian Hunter
2023-03-14 12:28     ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230311065753.3012826-2-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andres@anarazel.de \
    --cc=eranian@google.com \
    --cc=gpavithrasha@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mliska@suse.cz \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=quentin@isovalent.com \
    --cc=roberto.sassu@huawei.com \
    --cc=trix@redhat.com \
    --cc=yangjihong1@huawei.com \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).