aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-06-04 09:07:25 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-06-04 13:49:56 -0400
commitb44f2d6da7fddd7a6f51a7b235e9bfe28e36fdce (patch)
treeabad2075aa321fad87f537b50ce3e42f016d3942
parentcc95b7c834718ac4889cbb20ba950468ccdd84fe (diff)
build: Add test to see if we can build python
Check if python-config works, and if it does, try to build the python code. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a4a89ed..dd1eaff 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,11 @@ ifndef VERBOSE
43 VERBOSE = 0 43 VERBOSE = 0
44endif 44endif
45 45
46# Can build python?
47ifeq ($(shell sh -c "python-config --includes > /dev/null 2>&1 && echo y"), y)
48 BUILD_PYTHON := python python-plugin
49endif
50
46ifeq ("$(origin O)", "command line") 51ifeq ("$(origin O)", "command line")
47 BUILD_OUTPUT := $(O) 52 BUILD_OUTPUT := $(O)
48endif 53endif
@@ -234,7 +239,8 @@ PLUGINS := $(PLUGIN_OBJS:.o=.so)
234ALL_OBJS = $(TRACE_CMD_OBJS) $(KERNEL_SHARK_OBJS) $(TRACE_VIEW_MAIN_OBJS) \ 239ALL_OBJS = $(TRACE_CMD_OBJS) $(KERNEL_SHARK_OBJS) $(TRACE_VIEW_MAIN_OBJS) \
235 $(TRACE_GRAPH_MAIN_OBJS) $(TCMD_LIB_OBJS) $(PLUGIN_OBJS) 240 $(TRACE_GRAPH_MAIN_OBJS) $(TCMD_LIB_OBJS) $(PLUGIN_OBJS)
236 241
237CMD_TARGETS = trace_plugin_dir tc_version.h libparsevent.a $(LIB_FILE) trace-cmd $(PLUGINS) 242CMD_TARGETS = trace_plugin_dir tc_version.h libparsevent.a $(LIB_FILE) \
243 trace-cmd $(PLUGINS) $(BUILD_PYTHON)
238 244
239GUI_TARGETS = ks_version.h trace-graph trace-view kernelshark 245GUI_TARGETS = ks_version.h trace-graph trace-view kernelshark
240 246