aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-02-01 13:40:51 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-02-01 13:40:51 -0500
commit978f626c4e5b9524d1898788d8e34d86dfa00795 (patch)
treeb53b75b013c699e601cf809e6a10a59aeb02b4e9 /tools
parent0015e2e101f5fd3256ab8b5a374c0e8806098871 (diff)
perf tools: Don't try to build python bindings if Python.h not available
Just leverage the test done for python support in 'python script', emitting a warning about losing those features if python-dev[el] is not installed. Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 85f654927b92..4c9499cb4398 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -348,14 +348,14 @@ PROGRAMS += $(EXTRA_PROGRAMS)
348# 348#
349PROGRAMS += $(OUTPUT)perf 349PROGRAMS += $(OUTPUT)perf
350 350
351LANG_BINDINGS = $(OUTPUT)python/perf.so 351LANG_BINDINGS =
352 352
353# List built-in command $C whose implementation cmd_$C() is not in 353# List built-in command $C whose implementation cmd_$C() is not in
354# builtin-$C.o but is linked in as part of some other command. 354# builtin-$C.o but is linked in as part of some other command.
355# 355#
356 356
357# what 'all' will build and 'install' will install, in perfexecdir 357# what 'all' will build and 'install' will install, in perfexecdir
358ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) $(LANG_BINDINGS) 358ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
359 359
360# what 'all' will build but not install in perfexecdir 360# what 'all' will build but not install in perfexecdir
361OTHER_PROGRAMS = $(OUTPUT)perf$X 361OTHER_PROGRAMS = $(OUTPUT)perf$X
@@ -664,12 +664,14 @@ else
664 PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null` 664 PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null`
665 FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) 665 FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
666 ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y) 666 ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y)
667 msg := $(warning No Python.h found, install python-dev[el] to have python support in 'perf script' and to build the python bindings)
667 BASIC_CFLAGS += -DNO_LIBPYTHON 668 BASIC_CFLAGS += -DNO_LIBPYTHON
668 else 669 else
669 ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS) 670 ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
670 EXTLIBS += $(PYTHON_EMBED_LIBADD) 671 EXTLIBS += $(PYTHON_EMBED_LIBADD)
671 LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o 672 LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
672 LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o 673 LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
674 LANG_BINDINGS += $(OUTPUT)python/perf.so
673 endif 675 endif
674endif 676endif
675 677
@@ -956,7 +958,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
956 958
957SHELL = $(SHELL_PATH) 959SHELL = $(SHELL_PATH)
958 960
959all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS 961all:: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS
960ifneq (,$X) 962ifneq (,$X)
961 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';) 963 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
962endif 964endif