summaryrefslogtreecommitdiff
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2010-03-11 13:57:00 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:58:24 -0700
commit1245bd8d18584ad5f14185439de0aad1a9d97a43 (patch)
treeef7554690514ba102252853c34739fa7590b7dfe /tools/perf/Makefile
parentbddf110a16cb4095ae2b8105133f4bdb618a8ea9 (diff)
perf: Make the install relative to DESTDIR if specified
commit 7ae5f21361fea11f58c398701da635f778635d13 upstream. Without this change, the install path is relative to prefix/DESTDIR where prefix is automatically set to $HOME. This can produce unexpected results. For example: make -C tools/perf DESTDIR=/home/jkacur/tmp install-man creates the directory: /home/jkacur/home/jkacur/tmp/share/... instead of the expected: /home/jkacur/tmp/share/... Signed-off-by: John Kacur <jkacur@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Tom Zanussi <tzanussi@gmail.com> Cc: Kyle McMartin <kyle@redhat.com> LKML-Reference: <1268312220-12880-1-git-send-email-jkacur@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7e190d522cd5..719d0283c9f3 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -218,7 +218,10 @@ STRIP ?= strip
# runtime figures out where they are based on the path to the executable.
# This can help installing the suite in a relocatable way.
+# Make the path relative to DESTDIR, not to prefix
+ifndef DESTDIR
prefix = $(HOME)
+endif
bindir_relative = bin
bindir = $(prefix)/$(bindir_relative)
mandir = share/man
@@ -235,7 +238,6 @@ sysconfdir = $(prefix)/etc
ETC_PERFCONFIG = etc/perfconfig
endif
lib = lib
-# DESTDIR=
export prefix bindir sharedir sysconfdir