]>
Commit | Line | Data |
---|---|---|
ed95e27c GKH |
1 | From 7ae5f21361fea11f58c398701da635f778635d13 Mon Sep 17 00:00:00 2001 |
2 | From: John Kacur <jkacur@redhat.com> | |
3 | Date: Thu, 11 Mar 2010 13:57:00 +0100 | |
4 | Subject: perf: Make the install relative to DESTDIR if specified | |
5 | ||
6 | From: John Kacur <jkacur@redhat.com> | |
7 | ||
8 | commit 7ae5f21361fea11f58c398701da635f778635d13 upstream. | |
9 | ||
10 | Without this change, the install path is relative to | |
11 | prefix/DESTDIR where prefix is automatically set to $HOME. | |
12 | ||
13 | This can produce unexpected results. For example: | |
14 | ||
15 | make -C tools/perf DESTDIR=/home/jkacur/tmp install-man | |
16 | ||
17 | creates the directory: /home/jkacur/home/jkacur/tmp/share/... | |
18 | instead of the expected: /home/jkacur/tmp/share/... | |
19 | ||
20 | Signed-off-by: John Kacur <jkacur@redhat.com> | |
21 | Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> | |
22 | Cc: Paul Mackerras <paulus@samba.org> | |
23 | Cc: Arnaldo Carvalho de Melo <acme@redhat.com> | |
24 | Cc: Frederic Weisbecker <fweisbec@gmail.com> | |
25 | Cc: Tom Zanussi <tzanussi@gmail.com> | |
26 | Cc: Kyle McMartin <kyle@redhat.com> | |
27 | LKML-Reference: <1268312220-12880-1-git-send-email-jkacur@redhat.com> | |
28 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | |
29 | Signed-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 |