From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 9/9] trace-cmd: Only install libtraceevent and libtracefs if not in system
Date: Wed, 09 Dec 2020 21:29:15 -0500 [thread overview]
Message-ID: <20201210022944.212527059@goodmis.org> (raw)
In-Reply-To: 20201210022906.112066412@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
If libtraceevent and libtracefs are not built locally, because they are
already on the local system, do not install them either.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 8d82db567a52..022b7c3d89d4 100644
--- a/Makefile
+++ b/Makefile
@@ -213,6 +213,7 @@ else
LIBTRACEEVENT_CFLAGS = -I$(src)/include/traceevent -I$(src)/lib/traceevent/include
LIBTRACEEVENT_LDLAGS = -L$(LIBTRACEEVENT_DIR) -ltraceevent
LIBTRACEEVENT_STATIC_BUILD = $(LIBTRACEEVENT_STATIC)
+INSTALL_TRACEEVENT = install_traceevent
endif
export LIBTRACEEVENT_CFLAGS LIBTRACEEVENT_LDLAGS
@@ -224,6 +225,7 @@ else
LIBTRACEFS_CFLAGS = -I$(src)/include/tracefs
LIBTRACEFS_LDLAGS = -L$(LIBTRACEFS_DIR) -ltracefs
LIBTRACEFS_STATIC_BUILD = $(LIBTRACEFS_STATIC)
+INSTALL_TRACEFS = install_tracefs
endif
export LIBTRACEFS_CFLAGS LIBTRACEFS_LDLAGS
@@ -343,7 +345,7 @@ $(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
$(LIBTRACECMD_STATIC): force
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
-$(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED)
+$(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED_BUILD)
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
$(LIBTRACEFS_STATIC): force
@@ -359,7 +361,7 @@ libtracecmd.so: $(LIBTRACECMD_SHARED)
libtracefs.a: $(LIBTRACEFS_STATIC)
libtracefs.so: $(LIBTRACEFS_SHARED)
-libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED) $(LIBTRACEFS_SHARED)
+libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED_BUILD) $(LIBTRACEFS_SHARED_BUILD)
test: force $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACEFS_STATIC_BUILD) $(LIBTRACECMD_STATIC)
ifneq ($(CUNIT_INSTALLED),1)
@@ -432,18 +434,22 @@ install: install_cmd
install_gui: install_cmd gui
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build install
-install_libs: libs
- $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
+install_traceevent: $(LIBTRACEEVENT_STATIC_BUILD)
$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)/traceevent)
- $(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)/tracefs)
$(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent)
$(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent)
- $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
- $(Q)$(call do_install,$(src)/include/tracefs/tracefs.h,$(includedir_SQ)/tracefs)
- $(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/trace-cmd)
$(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/traceevent)
+
+install_tracefs: $(LIBTRACEFS_STATIC_BUILD)
+ $(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)/tracefs)
+ $(Q)$(call do_install,$(src)/include/tracefs/tracefs.h,$(includedir_SQ)/tracefs)
$(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/tracefs)
+install_libs: libs $(INSTALL_TRACEEVENT) $(INSTALL_TRACEFS)
+ $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
+ $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
+ $(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/trace-cmd)
+
doc:
$(MAKE) -C $(src)/Documentation all
doc_gui:
--
2.29.2
prev parent reply other threads:[~2020-12-10 2:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 2:29 [PATCH 0/9] trace-cmd: Clean ups and fixes for installing libraries Steven Rostedt
2020-12-10 2:29 ` [PATCH 1/9] trace-cmd: Fix whitespace in usage message of trace-cmd report --ts-diff Steven Rostedt
2020-12-10 2:29 ` [PATCH 2/9] trace-cmd: Add reference to trace-cmd.org in README Steven Rostedt
2020-12-10 2:29 ` [PATCH 3/9] trace-cmd: Add --ts-check option to report Steven Rostedt
2020-12-10 2:29 ` [PATCH 4/9] trace-cmd: Update .gitignore Steven Rostedt
2020-12-10 2:29 ` [PATCH 5/9] libtracefs: Extend tracefs_iterate_raw_events() to iterate per CPU Steven Rostedt
2020-12-10 2:29 ` [PATCH 6/9] libtracefs: Unit test for tracefs_iterate_raw_events() " Steven Rostedt
2020-12-10 2:29 ` [PATCH 7/9] trace-cmd: Use system trace libraries, if available Steven Rostedt
2020-12-10 2:29 ` [PATCH 8/9] trace-cmd: Have "make test" use system libraries if present Steven Rostedt
2020-12-10 2:29 ` Steven Rostedt [this message]
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=20201210022944.212527059@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).