aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@infradead.org>2012-10-18 10:38:35 -0400
committerIngo Molnar <mingo@kernel.org>2012-10-19 20:43:08 -0400
commit45bff41a9a6f22af28e4ba22f83c87f619e573a8 (patch)
tree3b7b76347fe6e0f1c23352ceb0d0b70b59da5a06 /tools/perf/Makefile
parenta448a0318af1a11b8f54d01a349b0036a3cff965 (diff)
perf python: Properly link with libtraceevent
Namhyung Kim reported that the build fails with: GEN python/perf.so gcc: error: python_ext_build/tmp//../../libtraceevent.a: No such file or directory error: command 'gcc' failed with exit status 1 cp: cannot stat `python_ext_build/lib/perf.so': No such file or directory make: *** [python/perf.so] Error 1 We need to propagate the TE_PATH variable to the setup.py file. Reported-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: http://lkml.kernel.org/n/tip-8umiPbm4sxpknKivbjgykhut@git.kernel.org [ Fixed superfluous variable build error. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile24
1 files changed, 13 insertions, 11 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index f7c968ad517..00deed4d615 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -184,9 +184,22 @@ SCRIPT_SH += perf-archive.sh
184grep-libs = $(filter -l%,$(1)) 184grep-libs = $(filter -l%,$(1))
185strip-libs = $(filter-out -l%,$(1)) 185strip-libs = $(filter-out -l%,$(1))
186 186
187TRACE_EVENT_DIR = ../lib/traceevent/
188
189ifneq ($(OUTPUT),)
190 TE_PATH=$(OUTPUT)
191else
192 TE_PATH=$(TRACE_EVENT_DIR)
193endif
194
195LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
196TE_LIB := -L$(TE_PATH) -ltraceevent
197
187PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) 198PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
188PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py 199PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py
189 200
201export LIBTRACEEVENT
202
190$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) 203$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
191 $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ 204 $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
192 --quiet build_ext; \ 205 --quiet build_ext; \
@@ -198,17 +211,6 @@ $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
198 211
199SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) 212SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH))
200 213
201TRACE_EVENT_DIR = ../lib/traceevent/
202
203ifneq ($(OUTPUT),)
204 TE_PATH=$(OUTPUT)
205else
206 TE_PATH=$(TRACE_EVENT_DIR)
207endif
208
209LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
210TE_LIB := -L$(TE_PATH) -ltraceevent
211
212# 214#
213# Single 'perf' binary right now: 215# Single 'perf' binary right now:
214# 216#