Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753877AbbETM07 (ORCPT ); Wed, 20 May 2015 08:26:59 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56902 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbbETM0y (ORCPT ); Wed, 20 May 2015 08:26:54 -0400 Date: Wed, 20 May 2015 05:26:16 -0700 From: tip-bot for Wang Nan Message-ID: Cc: daniel@iogearbox.net, wangnan0@huawei.com, paulus@samba.org, lizefan@huawei.com, hpa@zytor.com, ast@plumgrid.com, jolsa@kernel.org, acme@redhat.com, masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de, a.p.zijlstra@chello.nl, mingo@kernel.org, brendan.d.gregg@gmail.com, namhyung@kernel.org, rostedt@goodmis.org, dsahern@gmail.com, linux-kernel@vger.kernel.org Reply-To: brendan.d.gregg@gmail.com, namhyung@kernel.org, dsahern@gmail.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, daniel@iogearbox.net, wangnan0@huawei.com, lizefan@huawei.com, hpa@zytor.com, paulus@samba.org, ast@plumgrid.com, jolsa@kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <1431860222-61636-4-git-send-email-wangnan0@huawei.com> References: <1431860222-61636-4-git-send-email-wangnan0@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools lib traceevent: Install libtraceevent.a into libdir Git-Commit-ID: bb53e176fed9b6c9321904558b4e605b4770e454 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4134 Lines: 128 Commit-ID: bb53e176fed9b6c9321904558b4e605b4770e454 Gitweb: http://git.kernel.org/tip/bb53e176fed9b6c9321904558b4e605b4770e454 Author: Wang Nan AuthorDate: Sun, 17 May 2015 10:56:28 +0000 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 18 May 2015 12:36:25 -0300 tools lib traceevent: Install libtraceevent.a into libdir Before this patch, 'make install' installs libraries into bindir: $ make install DESTDIR=./tree INSTALL trace_plugins INSTALL libtraceevent.a INSTALL libtraceevent.so $ find ./tree ./tree/ ./tree/usr ./tree/usr/local ./tree/usr/local/bin ./tree/usr/local/bin/libtraceevent.a ./tree/usr/local/bin/libtraceevent.so ... /usr/local/lib( or lib64) should be a better place. This patch replaces 'bin' with libdir. For __LP64__ building, libraries are installed to /usr/local/lib64. For other building, to /usr/local/lib instead. After applying this patch: $ make install DESTDIR=./tree INSTALL trace_plugins INSTALL libtraceevent.a INSTALL libtraceevent.so $ find ./tree ./tree ./tree/usr ./tree/usr/local ./tree/usr/local/lib64 ./tree/usr/local/lib64/libtraceevent.a ./tree/usr/local/lib64/traceevent ./tree/usr/local/lib64/traceevent/plugins ./tree/usr/local/lib64/traceevent/plugins/plugin_mac80211.so ./tree/usr/local/lib64/traceevent/plugins/plugin_hrtimer.so ... ./tree/usr/local/lib64/libtraceevent.so Signed-off-by: Wang Nan Acked-by: Jiri Olsa Acked-by: Steven Rostedt Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Daniel Borkmann Cc: David Ahern Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: pi3orama@163.com Cc: Zefan Li Link: http://lkml.kernel.org/r/1431860222-61636-4-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/traceevent/Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index d410da3..8464039 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -34,9 +34,15 @@ INSTALL = install DESTDIR ?= DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' +LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) +ifeq ($(LP64), 1) + libdir_relative = lib64 +else + libdir_relative = lib +endif + prefix ?= /usr/local -bindir_relative = bin -bindir = $(prefix)/$(bindir_relative) +libdir = $(prefix)/$(libdir_relative) man_dir = $(prefix)/share/man man_dir_SQ = '$(subst ','\'',$(man_dir))' @@ -58,7 +64,7 @@ ifeq ($(prefix),$(HOME)) override plugin_dir = $(HOME)/.traceevent/plugins set_plugin_dir := 0 else -override plugin_dir = $(prefix)/lib/traceevent/plugins +override plugin_dir = $(libdir)/traceevent/plugins endif endif @@ -85,11 +91,11 @@ srctree := $(patsubst %/,%,$(dir $(srctree))) #$(info Determined 'srctree' to be $(srctree)) endif -export prefix bindir src obj +export prefix libdir src obj # Shell quotes -bindir_SQ = $(subst ','\'',$(bindir)) -bindir_relative_SQ = $(subst ','\'',$(bindir_relative)) +libdir_SQ = $(subst ','\'',$(libdir)) +libdir_relative_SQ = $(subst ','\'',$(libdir_relative)) plugin_dir_SQ = $(subst ','\'',$(plugin_dir)) LIB_FILE = libtraceevent.a libtraceevent.so @@ -240,7 +246,7 @@ endef install_lib: all_cmd install_plugins $(call QUIET_INSTALL, $(LIB_FILE)) \ - $(call do_install,$(LIB_FILE),$(bindir_SQ)) + $(call do_install,$(LIB_FILE),$(libdir_SQ)) install_plugins: $(PLUGINS) $(call QUIET_INSTALL, trace_plugins) \ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/