]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.33.2/perf-make-the-install-relative-to-destdir-if-specified.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.33.2 / perf-make-the-install-relative-to-destdir-if-specified.patch
CommitLineData
ed95e27c
GKH
1From 7ae5f21361fea11f58c398701da635f778635d13 Mon Sep 17 00:00:00 2001
2From: John Kacur <jkacur@redhat.com>
3Date: Thu, 11 Mar 2010 13:57:00 +0100
4Subject: perf: Make the install relative to DESTDIR if specified
5
6From: John Kacur <jkacur@redhat.com>
7
8commit 7ae5f21361fea11f58c398701da635f778635d13 upstream.
9
10Without this change, the install path is relative to
11prefix/DESTDIR where prefix is automatically set to $HOME.
12
13This can produce unexpected results. For example:
14
15 make -C tools/perf DESTDIR=/home/jkacur/tmp install-man
16
17creates the directory: /home/jkacur/home/jkacur/tmp/share/...
18instead of the expected: /home/jkacur/tmp/share/...
19
20Signed-off-by: John Kacur <jkacur@redhat.com>
21Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
22Cc: Paul Mackerras <paulus@samba.org>
23Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
24Cc: Frederic Weisbecker <fweisbec@gmail.com>
25Cc: Tom Zanussi <tzanussi@gmail.com>
26Cc: Kyle McMartin <kyle@redhat.com>
27LKML-Reference: <1268312220-12880-1-git-send-email-jkacur@redhat.com>
28Signed-off-by: Ingo Molnar <mingo@elte.hu>
29Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30
31---
32 tools/perf/Documentation/Makefile | 4 +++-
33 tools/perf/Makefile | 4 +++-
34 2 files changed, 6 insertions(+), 2 deletions(-)
35
36--- a/tools/perf/Documentation/Makefile
37+++ b/tools/perf/Documentation/Makefile
38@@ -24,7 +24,10 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT
39 DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT))
40 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
41
42+# Make the path relative to DESTDIR, not prefix
43+ifndef DESTDIR
44 prefix?=$(HOME)
45+endif
46 bindir?=$(prefix)/bin
47 htmldir?=$(prefix)/share/doc/perf-doc
48 pdfdir?=$(prefix)/share/doc/perf-doc
49@@ -32,7 +35,6 @@ mandir?=$(prefix)/share/man
50 man1dir=$(mandir)/man1
51 man5dir=$(mandir)/man5
52 man7dir=$(mandir)/man7
53-# DESTDIR=
54
55 ASCIIDOC=asciidoc
56 ASCIIDOC_EXTRA = --unsafe
57--- a/tools/perf/Makefile
58+++ b/tools/perf/Makefile
59@@ -216,7 +216,10 @@ STRIP ?= strip
60 # runtime figures out where they are based on the path to the executable.
61 # This can help installing the suite in a relocatable way.
62
63+# Make the path relative to DESTDIR, not to prefix
64+ifndef DESTDIR
65 prefix = $(HOME)
66+endif
67 bindir_relative = bin
68 bindir = $(prefix)/$(bindir_relative)
69 mandir = share/man
70@@ -233,7 +236,6 @@ sysconfdir = $(prefix)/etc
71 ETC_PERFCONFIG = etc/perfconfig
72 endif
73 lib = lib
74-# DESTDIR=
75
76 export prefix bindir sharedir sysconfdir
77