From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 12/13] trace-cmd: Do not build shared libraries for libtracefs and libtraceevent
Date: Fri, 11 Dec 2020 12:08:54 -0500 [thread overview]
Message-ID: <20201211171014.867885861@goodmis.org> (raw)
In-Reply-To: 20201211170842.611554918@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
As libtraceevent and libtracefs are now packaged separately and are built
from their own corresponding repos, the local copy that trace-cmd uses is
only in the case that the libraries are not present on the local system.
In this case, trace-cmd should build its wont static library and link to
that. This will be deprecated in the future and trace-cmd will eventually
depend on the external libraries for libtracefs and libtraceevent.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 13 +------------
lib/traceevent/Makefile | 5 +----
lib/tracefs/Makefile | 5 +----
3 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/Makefile b/Makefile
index 737e54d82697..1f7cab57cd7d 100644
--- a/Makefile
+++ b/Makefile
@@ -234,12 +234,10 @@ export LIBTRACECMD_SHARED_VERSION LIBTRACECMD_SHARED_SO
LIBTRACEEVENT=libtraceevent
LIBTRACEEVENT_DIR = $(obj)/lib/traceevent
LIBTRACEEVENT_STATIC = $(LIBTRACEEVENT_DIR)/libtraceevent.a
-LIBTRACEEVENT_SHARED = $(LIBTRACEEVENT_DIR)/libtraceevent.so
LIBTRACEFS=libtracefs
LIBTRACEFS_DIR = $(obj)/lib/tracefs
LIBTRACEFS_STATIC = $(LIBTRACEFS_DIR)/libtracefs.a
-LIBTRACEFS_SHARED = $(LIBTRACEFS_DIR)/libtracefs.so
ifeq ($(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT) > /dev/null 2>&1 && echo y"), y)
LIBTRACEEVENT_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT)")
@@ -369,10 +367,6 @@ trace-cmd: force $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACECMD_STATIC) $(LIBTRACEF
force $(obj)/lib/trace-cmd/plugins/tracecmd_plugin_dir
$(Q)$(MAKE) -C $(src)/tracecmd $(obj)/tracecmd/$@
-$(LIBTRACEEVENT_SHARED): force $(obj)/lib/traceevent/plugins/trace_python_dir \
- $(obj)/lib/traceevent/plugins/traceevent_plugin_dir
- $(Q)$(MAKE) -C $(src)/lib/traceevent $@
-
$(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
$(obj)/lib/traceevent/plugins/traceevent_plugin_dir
$(Q)$(MAKE) -C $(src)/lib/traceevent $@
@@ -386,17 +380,12 @@ $(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED_BUILD)
$(LIBTRACEFS_STATIC): force
$(Q)$(MAKE) -C $(src)/lib/tracefs $@
-$(LIBTRACEFS_SHARED): force
- $(Q)$(MAKE) -C $(src)/lib/tracefs $@
-
-libtraceevent.so: $(LIBTRACEEVENT_SHARED)
libtraceevent.a: $(LIBTRACEEVENT_STATIC)
libtracecmd.a: $(LIBTRACECMD_STATIC)
libtracecmd.so: $(LIBTRACECMD_SHARED)
libtracefs.a: $(LIBTRACEFS_STATIC)
-libtracefs.so: $(LIBTRACEFS_SHARED)
-libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED_BUILD) $(LIBTRACEFS_SHARED_BUILD)
+libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACEFS_STATIC_BUILD)
test: force $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACEFS_STATIC_BUILD) $(LIBTRACECMD_STATIC)
ifneq ($(CUNIT_INSTALLED),1)
diff --git a/lib/traceevent/Makefile b/lib/traceevent/Makefile
index 0f9e5db8f7df..edb2fccfff07 100644
--- a/lib/traceevent/Makefile
+++ b/lib/traceevent/Makefile
@@ -32,9 +32,6 @@ $(DEPS): | $(bdir)
$(bdir)/libtraceevent.a: $(OBJS)
$(Q)$(call do_build_static_lib)
-$(bdir)/libtraceevent.so: $(OBJS)
- $(Q)$(call do_compile_shared_library)
-
$(bdir)/%.o: %.c
$(Q)$(call do_fpic_compile)
@@ -50,6 +47,6 @@ ifneq ($(dep_includes),)
endif
clean:
- $(RM) -f $(bdir)/*.a $(bdir)/*.so $(bdir)/*.o $(bdir)/.*.d
+ $(RM) -f $(bdir)/*.a $(bdir)/*.o $(bdir)/.*.d
.PHONY: clean
diff --git a/lib/tracefs/Makefile b/lib/tracefs/Makefile
index 590a0ffed91a..33112690914d 100644
--- a/lib/tracefs/Makefile
+++ b/lib/tracefs/Makefile
@@ -29,9 +29,6 @@ LIBS = -L$(obj)/lib/traceevent -ltraceevent
$(bdir)/libtracefs.a: $(OBJS)
$(Q)$(call do_build_static_lib)
-$(bdir)/libtracefs.so: $(OBJS)
- $(Q)$(call do_compile_shared_library)
-
$(bdir)/%.o: %.c
$(Q)$(call do_fpic_compile)
@@ -47,6 +44,6 @@ ifneq ($(dep_includes),)
endif
clean:
- $(RM) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.o $(bdir)/.*.d
+ $(RM) $(bdir)/*.a $(bdir)/*.o $(bdir)/.*.d
.PHONY: clean
--
2.29.2
next prev parent reply other threads:[~2020-12-11 18:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 17:08 [PATCH 00/13] trace-cmd: Clean ups to the Makefile for using external libraries Steven Rostedt
2020-12-11 17:08 ` [PATCH 01/13] trace-cmd: Add missing SPDX headers Steven Rostedt
2020-12-11 17:08 ` [PATCH 02/13] trace-cmd: Allow overriding of pkg-config Steven Rostedt
2020-12-11 17:08 ` [PATCH 03/13] trace-cmd: Use $(LIBTRACECMD_STATIC) instead of open coding in Makefile Steven Rostedt
2020-12-11 17:08 ` [PATCH 04/13] trace-cmd: Add versioning to libtracecmd.so Steven Rostedt
2020-12-11 17:08 ` [PATCH 05/13] trace-cmd: Add pkg-config configuration for libtracecmd.so Steven Rostedt
2020-12-11 17:08 ` [PATCH 06/13] trace-cmd: Clean up the Makefiles a little Steven Rostedt
2020-12-11 17:08 ` [PATCH 07/13] trace-cmd: Remove making of ld.so.conf.d/trace.conf Steven Rostedt
2020-12-11 17:08 ` [PATCH 08/13] trace-cmd: Install libtracecmd in the proper lib directory Steven Rostedt
2020-12-11 17:08 ` [PATCH 09/13] trace-cmd: Move the installing of libtracecmd to the lib/trace-cmd Makefile Steven Rostedt
2020-12-11 17:08 ` [PATCH 10/13] trace-cmd: Install the soft links for libtracecmd.so Steven Rostedt
2020-12-11 17:08 ` [PATCH 11/13] trace-cmd: Do not install libtracefs nor libtraceevent libraries Steven Rostedt
2020-12-11 17:08 ` Steven Rostedt [this message]
2020-12-11 17:08 ` [PATCH 13/13] trace-cmd: Add warning if libtracefs or libtraceevent are not found Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201211171014.867885861@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).