[PATCH for 2.9] trace-cmd: Fix python build to handle new library headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

The python build still references the internal event-parse.h header even
if the latest libtraceevent is installed on the system. This causes
inconsistencies between what's in the updated system header with the
obsoleted internal header.

Update the make files to use the proper header to build the python code as
the rest of the build uses.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
 Makefile        | 7 ++++---
 python/Makefile | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 2ff40a8e..3bcafd74 100644
--- a/Makefile
+++ b/Makefile
@@ -280,7 +280,9 @@ export LIBTRACEFS_CFLAGS LIBTRACEFS_LDLAGS
 TRACE_LIBS = -L$(LIBTRACECMD_DIR) -ltracecmd	\
 	     $(LIBTRACEEVENT_LDLAGS) $(LIBTRACEFS_LDLAGS)
 
-export LIBS TRACE_LIBS
+TRACE_INCLUDES = $(LIBTRACEEVENT_CFLAGS) $(LIBTRACEFS_CFLAGS)
+
+export LIBS TRACE_LIBS TRACE_INCLUDES
 export LIBTRACEEVENT_DIR LIBTRACECMD_DIR LIBTRACEFS_DIR
 export Q SILENT VERBOSE EXT
 
@@ -292,8 +294,7 @@ INCLUDES += -I$(src)/include/trace-cmd
 INCLUDES += -I$(src)/lib/trace-cmd/include
 INCLUDES += -I$(src)/lib/trace-cmd/include/private
 INCLUDES += -I$(src)/tracecmd/include
-INCLUDES += $(LIBTRACEEVENT_CFLAGS)
-INCLUDES += $(LIBTRACEFS_CFLAGS)
+INCLUDES += $(TRACE_INCLUDES)
 
 include $(src)/features.mk
 
diff --git a/python/Makefile b/python/Makefile
index d2906c4f..ddb9af4c 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -9,8 +9,8 @@ PYTHON_PY_LIBS := tracecmd.install
 endif
 
 ctracecmd.so: ctracecmd.i $(LIBTRACECMD_STATIC)
-	swig -Wall -python -noproxy -I$(src)/include/traceevent -I$(src)/include/trace-cmd ctracecmd.i
-	$(CC) -fpic -c $(CPPFLAGS) $(CFLAGS) $(PYTHON_INCLUDES)  ctracecmd_wrap.c
+	swig -Wall -python -noproxy -I$(src)/include/trace-cmd $(TRACE_INCLUDES) ctracecmd.i
+	$(CC) -fpic -c $(CPPFLAGS) $(CFLAGS) $(PYTHON_INCLUDES) $(TRACE_INCLUDES) ctracecmd_wrap.c
 	$(CC) --shared $(LIBTRACECMD_STATIC) $(LDFLAGS) ctracecmd_wrap.o -o ctracecmd.so $(TRACE_LIBS)
 
 $(PYTHON_SO_INSTALL): %.install : %.so force
-- 
2.31.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux