mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <kernel-team@fb.com>, <linux-kernel@vger.kernel.org>,
	<rostedt@goodmis.org>
Subject: [PATCH 01/11] trace-cmd: add install_libs target to trace-cmd
Date: Fri, 20 Nov 2015 15:57:23 -0500	[thread overview]
Message-ID: <1448053053-24188-2-git-send-email-jbacik@fb.com> (raw)
In-Reply-To: <1448053053-24188-1-git-send-email-jbacik@fb.com>

This allows other commands to link against trace-cmd.

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
 Makefile | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 73a98d1..6b5bd29 100644
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,10 @@ html_install = $(prefix)/share/kernelshark/html
 html_install_SQ = '$(subst ','\'',$(html_install))'
 img_install = $(prefix)/share/kernelshark/html/images
 img_install_SQ = '$(subst ','\'',$(img_install))'
-libdir ?= lib
+libdir ?= $(prefix)/lib
+libdir_SQ = '$(subst ','\'',$(libdir))'
+includedir = $(prefix)/include/trace-cmd
+includedir_SQ = '$(subst ','\'',$(includedir))'
 
 export man_dir man_dir_SQ html_install html_install_SQ INSTALL
 export img_install img_install_SQ
@@ -57,8 +60,8 @@ ifeq ($(prefix),$(HOME))
 plugin_dir = $(HOME)/.trace-cmd/plugins
 python_dir = $(HOME)/.trace-cmd/python
 else
-plugin_dir = $(prefix)/$(libdir)/trace-cmd/plugins
-python_dir = $(prefix)/$(libdir)/trace-cmd/python
+plugin_dir = $(libdir)/trace-cmd/plugins
+python_dir = $(libdir)/trace-cmd/python
 PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
 PYTHON_DIR = -DPYTHON_DIR="$(python_dir)"
 PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
@@ -415,6 +418,8 @@ libtracecmd.so: $(TCMD_LIB_OBJS)
 libtracecmd.a: $(TCMD_LIB_OBJS)
 	$(Q)$(do_build_static_lib)
 
+libs: libtracecmd.so libparsevent.so
+
 trace-util.o: trace_plugin_dir
 
 $(PLUGIN_OBJS): %.o : $(src)/%.c
@@ -574,6 +579,12 @@ install_gui: install_cmd gui
 	$(Q)$(call do_install,trace-graph,$(bindir_SQ))
 	$(Q)$(call do_install,kernelshark,$(bindir_SQ))
 
+install_libs: libs
+	$(Q)$(call do_install,libtracecmd.so,$(libdir_SQ))
+	$(Q)$(call do_install,libparsevent.so,$(libdir_SQ))
+	$(Q)$(call do_install,event-parse.h,$(includedir_SQ))
+	$(Q)$(call do_install,trace-cmd.h,$(includedir_SQ))
+
 doc:
 	$(MAKE) -C $(src)/Documentation all
 
-- 
2.1.0


  reply	other threads:[~2015-11-20 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 20:57 [PATCH 00/11] trace-cmd: make libtracecmd a linkable object Josef Bacik
2015-11-20 20:57 ` Josef Bacik [this message]
2015-11-20 20:57 ` [PATCH 02/11] trace-cmd: make libtracecmd a little more library friendly Josef Bacik
2015-11-20 20:57 ` [PATCH 03/11] trace-cmd: add a function to create a top instance Josef Bacik
2015-11-20 20:57 ` [PATCH 04/11] trace-cmd: add global functions for live tracing Josef Bacik
2019-07-09 13:09   ` Steven Rostedt
2019-07-09 13:56     ` Josef Bacik
2015-11-20 20:57 ` [PATCH 05/11] trace-cmd: allow for custom show and handle init Josef Bacik
2015-11-20 20:57 ` [PATCH 06/11] trace-cmd: add helpers for starting and stopping threads Josef Bacik
2015-11-20 20:57 ` [PATCH 07/11] trace-cmd: add trace-hash to libtracecmd Josef Bacik
2015-11-20 20:57 ` [PATCH 08/11] trace-cmd: add trace-stat and -ldl " Josef Bacik
2015-11-20 20:57 ` [PATCH 09/11] trace-cmd: disentangle profile and read from record Josef Bacik
2015-11-20 20:57 ` [PATCH 10/11] trace-cmd: add a helper function for stream polling Josef Bacik
2015-11-20 20:57 ` [PATCH 11/11] trace-cmd: add tracecmd_expand_event_list Josef Bacik
2016-11-21 17:13 ` [PATCH 00/11] trace-cmd: make libtracecmd a linkable object Steven Rostedt
2016-11-21 20:06   ` Josef Bacik

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=1448053053-24188-2-git-send-email-jbacik@fb.com \
    --to=jbacik@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®