diff mbox series

trace-cmd: Do not build or install traceevent plugins if libtraceevent exits

Message ID 20201223113300.6a284c7b@gandalf.local.home (mailing list archive)
State Accepted
Headers show
Series trace-cmd: Do not build or install traceevent plugins if libtraceevent exits | expand

Commit Message

Steven Rostedt Dec. 23, 2020, 4:33 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The plugins for libtraceevent belong to libtraceevent. If libtraceevent is
installed on the system, then the plugins for libtraceevent should not be
built or installed by trace-cmd.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index eb833f67..eae1eb39 100644
--- a/Makefile
+++ b/Makefile
@@ -243,10 +243,14 @@  endif
 ifeq ("$(TEST_LIBTRACEEVENT)", "y")
 LIBTRACEEVENT_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT)")
 LIBTRACEEVENT_LDLAGS = $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEEVENT)")
+TRACEEVENT_PLUGINS =
+TRACEEVENT_PLUGINS_INSTALL = 
 else
 LIBTRACEEVENT_CFLAGS = -I$(src)/include/traceevent -I$(src)/lib/traceevent/include
 LIBTRACEEVENT_LDLAGS = -L$(LIBTRACEEVENT_DIR) -ltraceevent
 LIBTRACEEVENT_STATIC_BUILD = $(LIBTRACEEVENT_STATIC)
+TRACEEVENT_PLUGINS = plugins_traceevent
+TRACEEVENT_PLUGINS_INSTALL = install_plugins_traceevent
 endif
 
 export LIBTRACEEVENT_CFLAGS LIBTRACEEVENT_LDLAGS
@@ -414,7 +418,7 @@  plugins_traceevent: force $(obj)/lib/traceevent/plugins/traceevent_plugin_dir \
 plugins_tracecmd: force $(obj)/lib/trace-cmd/plugins/tracecmd_plugin_dir
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd/plugins
 
-plugins: plugins_traceevent plugins_tracecmd
+plugins: $(TRACEEVENT_PLUGINS) plugins_tracecmd
 
 $(obj)/lib/traceevent/plugins/traceevent_plugin_dir: force
 	$(Q)$(MAKE) -C $(src)/lib/traceevent/plugins $@
@@ -454,7 +458,7 @@  install_plugins_traceevent: force
 install_plugins_tracecmd: force
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd/plugins install_plugins
 
-install_plugins: install_plugins_traceevent install_plugins_tracecmd
+install_plugins: $(TRACEEVENT_PLUGINS_INSTALL) install_plugins_tracecmd
 
 install_python: force
 	$(Q)$(MAKE) -C $(src)/python $@