diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-06-04 09:07:25 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-06-04 13:49:56 -0400 |
| commit | b44f2d6da7fddd7a6f51a7b235e9bfe28e36fdce (patch) | |
| tree | abad2075aa321fad87f537b50ce3e42f016d3942 | |
| parent | cc95b7c834718ac4889cbb20ba950468ccdd84fe (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-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -43,6 +43,11 @@ ifndef VERBOSE | |||
| 43 | VERBOSE = 0 | 43 | VERBOSE = 0 |
| 44 | endif | 44 | endif |
| 45 | 45 | ||
| 46 | # Can build python? | ||
| 47 | ifeq ($(shell sh -c "python-config --includes > /dev/null 2>&1 && echo y"), y) | ||
| 48 | BUILD_PYTHON := python python-plugin | ||
| 49 | endif | ||
| 50 | |||
| 46 | ifeq ("$(origin O)", "command line") | 51 | ifeq ("$(origin O)", "command line") |
| 47 | BUILD_OUTPUT := $(O) | 52 | BUILD_OUTPUT := $(O) |
| 48 | endif | 53 | endif |
| @@ -234,7 +239,8 @@ PLUGINS := $(PLUGIN_OBJS:.o=.so) | |||
| 234 | ALL_OBJS = $(TRACE_CMD_OBJS) $(KERNEL_SHARK_OBJS) $(TRACE_VIEW_MAIN_OBJS) \ | 239 | ALL_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 | ||
| 237 | CMD_TARGETS = trace_plugin_dir tc_version.h libparsevent.a $(LIB_FILE) trace-cmd $(PLUGINS) | 242 | CMD_TARGETS = trace_plugin_dir tc_version.h libparsevent.a $(LIB_FILE) \ |
| 243 | trace-cmd $(PLUGINS) $(BUILD_PYTHON) | ||
| 238 | 244 | ||
| 239 | GUI_TARGETS = ks_version.h trace-graph trace-view kernelshark | 245 | GUI_TARGETS = ks_version.h trace-graph trace-view kernelshark |
| 240 | 246 | ||
