All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for 2.9] trace-cmd: Fix python build to handle new library headers
@ 2021-12-13 19:16 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2021-12-13 19:16 UTC (permalink / raw)
  To: Linux Trace Devel

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

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@goodmis.org>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-13 19:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 19:16 [PATCH for 2.9] trace-cmd: Fix python build to handle new library headers Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.