Skip to content

Commit

Permalink
build: Use file names in BUILD_PYTHON macro
Browse files Browse the repository at this point in the history
The BUILD_PYTHON macro is added to the CMD_TARGETS which is used
also by 'make clean'. This requires that BUILD_PYTHON have the actual
files that are built instead of the target names.

Reported-by: Johannes Berg <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
Steven Rostedt authored and rostedt committed Jun 7, 2010
1 parent b31973a commit 0cb912f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ ifndef VERBOSE
VERBOSE = 0
endif

PYTHON := ctracecmd.so
PYTHON_GUI := ctracecmd.so ctracecmdgui.so

# Can build python?
ifeq ($(shell sh -c "python-config --includes > /dev/null 2>&1 && echo y"), y)
PYTHON_PLUGINS := plugin_python.so
BUILD_PYTHON := python python-plugin
BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
PYTHON_SO_INSTALL := ctracecmd.install
PYTHON_PY_INSTALL := event-viewer.install tracecmd.install tracecmdgui.install
endif
Expand Down Expand Up @@ -479,13 +482,13 @@ ctracecmdgui.so: $(TRACE_VIEW_OBJS) $(LIB_FILE)
$(CC) --shared $^ $(LIBS) $(CONFIG_LIBS) ctracecmdgui_wrap.o -o ctracecmdgui.so

PHONY += python
python: ctracecmd.so
python: $(PYTHON)

PHONY += python-gui
python-gui: ctracecmd.so ctracecmdgui.so
python-gui: $(PYTHON_GUI)

PHONY += python-plugin
python-plugin: plugin_python.so python
python-plugin: $(PYTHON_PLUGINs)

CFLAGS_plugin_python.o += $(PYTHON_DIR_SQ)

Expand Down

0 comments on commit 0cb912f

Please sign in to comment.