Linux-Trace-Devel Archive on
 help / color / Atom feed
* [PATCH] trace-cmd: Add LOCAL_LIBS variable to force building the local libraries
@ 2020-12-21 14:58 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2020-12-21 14:58 UTC (permalink / raw)
  To: Linux Trace Devel

From: "Steven Rostedt (VMware)" <>

In the process of changing the API for libtracefs before it becomes live,
add LOCAL_LIBS make command line variable to allow overriding the check if
libtracevent and libtracefs exist. If LOCAL_LIBS=1 is set on the make
command line, then the local versions of the libraries are built.

This is mostly for debug purposes, so it does not need to be documented.

Signed-off-by: Steven Rostedt (VMware) <>
 Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 7aef50b3..eb833f67 100644
--- a/Makefile
+++ b/Makefile
@@ -232,7 +232,15 @@ LIBTRACEFS=libtracefs
 LIBTRACEFS_DIR = $(obj)/lib/tracefs
-ifeq ($(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT) > /dev/null 2>&1 && echo y"), y)
+# In the special case (debugging), that the local versions of the
+# libraries need to be built, adding "LOCAL_LIBS=1" to the make
+# command line will skip the check if they are installed.
+ifneq ("$(origin LOCAL_LIBS)", "command line")
+TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT) > /dev/null 2>&1 && echo y")
+TEST_LIBTRACEFS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEFS) > /dev/null 2>&1 && echo y")
+ifeq ("$(TEST_LIBTRACEEVENT)", "y")
@@ -243,7 +251,7 @@ endif
-ifeq ($(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEFS) > /dev/null 2>&1 && echo y"), y)
+ifeq ("$(TEST_LIBTRACEFS)", "y")
 LIBTRACEFS_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEFS)")
 LIBTRACEFS_LDLAGS = $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEFS)")

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 14:58 [PATCH] trace-cmd: Add LOCAL_LIBS variable to force building the local libraries Steven Rostedt

Linux-Trace-Devel Archive on

Archives are clonable:
	git clone --mirror linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ \
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone