[PATCH 26/32] perf kbuild: fix installation of traceevent plugins

From: Alexis Berlemont
Date: Tue Jun 03 2014 - 18:11:20 EST


---
tools/perf/Makefile.kbuild | 10 +++++++---
tools/perf/config/Makefile | 1 +
tools/perf/tests/make | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile.kbuild b/tools/perf/Makefile.kbuild
index 7b1488c..7b7641c 100644
--- a/tools/perf/Makefile.kbuild
+++ b/tools/perf/Makefile.kbuild
@@ -92,7 +92,7 @@ export src-perf obj-perf

OUTPUT := $(obj-perf)/

-export OUTPUT
+export OUTPUT DESTDIR

AS = as
LD = ld
@@ -211,6 +211,7 @@ export PARSER_DEBUG_BISON
export PARSER_DEBUG_FLEX
export ETC_PERFCONFIG_SQ
export libdir_SQ
+export plugindir_SQ
export PYTHON_EMBED_CCOPTS
export PERL_EMBED_CCOPTS
export GTK_CFLAGS
@@ -273,6 +274,9 @@ $(LIBTRACEEVENT)-clean: FORCE
@mkdir -p $(obj-kernel)/tools/lib/traceevent
$(Q)$(MAKE) -sC $(srctree)/tools/lib/traceevent O=$(obj-kernel)/tools/lib/traceevent clean

+$(LIBTRACEEVENT)-install: $(LIBTRACEEVENT) FORCE
+ $(Q)$(MAKE) -sC $(srctree)/tools/lib/traceevent O=$(obj-kernel)/tools/lib/traceevent plugin_dir=$(plugindir_SQ) install
+
$(LIBAPIKFS): FORCE
@mkdir -p $(obj-kernel)/tools/lib/api
$(Q)$(MAKE) -C $(srctree)/tools/lib/api O=$(obj-kernel)/tools/lib/api
@@ -332,13 +336,13 @@ install-bin: all
$(INSTALL) $(src-perf)/scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'
$(INSTALL) $(src-perf)/scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'
- $(INSTALL) $(src-perf)/bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
+ $(INSTALL) $(src-perf)/perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'
$(INSTALL) $(src-perf)/tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
$(INSTALL) $(src-perf)/tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'

-install: install-bin try-install-man
+install: install-bin try-install-man $(LIBTRACEEVENT)-install

DOC_TARGETS := doc man html info pdf

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 1dd3469..9983254 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -759,6 +759,7 @@ all:
$(call store,DESTDIR_SQ)
$(call store,bindir_SQ)
$(call store,libdir_SQ)
+ $(call store,plugindir_SQ)
$(call store,perfexec_instdir_SQ)
$(call store,sysconfdir_SQ)
$(call store,GTK_CFLAGS)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 2aa2ed7..3db09e7 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -15,6 +15,7 @@ list = $(shell ls $1 2>/dev/null)
has = $(shell which $1 2>/dev/null)

# standard single make variable specified
+make_pure :=
make_clean_all := clean all
make_python_perf_so := python/perf.so
make_tags := tags
@@ -142,7 +143,7 @@ test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o
test_default = test -x $(PERF)/perf
test = $(if $(test_$1),$(test_$1),$(test_default))

-test_default_O = test -x $$TMP_O/perf
+test_default_O = test -x $$TMP_O/tools/perf/perf
test_O = $(if $(test_$1),$(test_$1),$(test_default_O))

all:
--
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/