From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 13/13] trace-cmd: Add warning if libtracefs or libtraceevent are not found
Date: Fri, 11 Dec 2020 12:08:55 -0500 [thread overview]
Message-ID: <20201211171015.035720645@goodmis.org> (raw)
In-Reply-To: 20201211170842.611554918@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Add a warning notice if either or both libtraceevent or libtracefs is not
found on the system for linking. If the local version is being built,
display a notice and show where they can get the corresponding library.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 4 ++--
lib/traceevent/Makefile | 14 ++++++++++++++
lib/tracefs/Makefile | 13 +++++++++++++
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 1f7cab57cd7d..ab91ae777b83 100644
--- a/Makefile
+++ b/Makefile
@@ -369,7 +369,7 @@ trace-cmd: force $(LIBTRACEEVENT_STATIC_BUILD) $(LIBTRACECMD_STATIC) $(LIBTRACEF
$(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
$(obj)/lib/traceevent/plugins/traceevent_plugin_dir
- $(Q)$(MAKE) -C $(src)/lib/traceevent $@
+ $(Q)$(MAKE) -C $(src)/lib/traceevent libtraceevent
$(LIBTRACECMD_STATIC): force
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
@@ -378,7 +378,7 @@ $(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED_BUILD)
$(Q)$(MAKE) -C $(src)/lib/trace-cmd libtracecmd.so
$(LIBTRACEFS_STATIC): force
- $(Q)$(MAKE) -C $(src)/lib/tracefs $@
+ $(Q)$(MAKE) -C $(src)/lib/tracefs libtracefs
libtraceevent.a: $(LIBTRACEEVENT_STATIC)
libtracecmd.a: $(LIBTRACECMD_STATIC)
diff --git a/lib/traceevent/Makefile b/lib/traceevent/Makefile
index edb2fccfff07..0dcd90c13328 100644
--- a/lib/traceevent/Makefile
+++ b/lib/traceevent/Makefile
@@ -29,9 +29,23 @@ $(bdir):
$(OBJS): | $(bdir)
$(DEPS): | $(bdir)
+.PHONY: warning
+warning:
+ @echo "********************************************"
+ @echo "** NOTICE: libtraceevent not found on system"
+ @echo "**"
+ @echo "** Building obsolete local version of libtraceevent"
+ @echo "** Consider installing the latest libtraceevent"
+ @echo "**"
+ @echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ "
+ @echo "**"
+ @echo "********************************************"
+
$(bdir)/libtraceevent.a: $(OBJS)
$(Q)$(call do_build_static_lib)
+libtraceevent: $(bdir)/libtraceevent.a warning
+
$(bdir)/%.o: %.c
$(Q)$(call do_fpic_compile)
diff --git a/lib/tracefs/Makefile b/lib/tracefs/Makefile
index 33112690914d..021ae2b040de 100644
--- a/lib/tracefs/Makefile
+++ b/lib/tracefs/Makefile
@@ -26,9 +26,22 @@ $(DEPS): | $(bdir)
LIBS = -L$(obj)/lib/traceevent -ltraceevent
+.PHONY: warning
+warning:
+ @echo "********************************************"
+ @echo "** NOTICE: libtracefs not found on system"
+ @echo "**"
+ @echo "** Building obsolete local version of libtracefs"
+ @echo "** Consider installing the latest libtracefs"
+ @echo "**"
+ @echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ "
+ @echo "**"
+ @echo "********************************************"
+
$(bdir)/libtracefs.a: $(OBJS)
$(Q)$(call do_build_static_lib)
+libtracefs: $(bdir)/libtracefs.a warning
$(bdir)/%.o: %.c
$(Q)$(call do_fpic_compile)
--
2.29.2
prev parent reply other threads:[~2020-12-11 18:57 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 ` [PATCH 12/13] trace-cmd: Do not build shared libraries for libtracefs and libtraceevent Steven Rostedt
2020-12-11 17:08 ` 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=20201211171015.035720645@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).