]> Git Repo - linux.git/commitdiff
perf: Make the install relative to DESTDIR if specified
authorJohn Kacur <[email protected]>
Thu, 11 Mar 2010 12:57:00 +0000 (13:57 +0100)
committerIngo Molnar <[email protected]>
Thu, 11 Mar 2010 13:08:11 +0000 (14:08 +0100)
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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: <[email protected]>
LKML-Reference: <1268312220[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
tools/perf/Documentation/Makefile
tools/perf/Makefile

index bdd3b7ecad0a6dedbf6fc673f7daf3e40c9c49ce..bd498d496952a6f78973b0e6b8422552009770d0 100644 (file)
@@ -24,7 +24,10 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
 DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT))
 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
 
+# Make the path relative to DESTDIR, not prefix
+ifndef DESTDIR
 prefix?=$(HOME)
+endif
 bindir?=$(prefix)/bin
 htmldir?=$(prefix)/share/doc/perf-doc
 pdfdir?=$(prefix)/share/doc/perf-doc
@@ -32,7 +35,6 @@ mandir?=$(prefix)/share/man
 man1dir=$(mandir)/man1
 man5dir=$(mandir)/man5
 man7dir=$(mandir)/man7
-# DESTDIR=
 
 ASCIIDOC=asciidoc
 ASCIIDOC_EXTRA = --unsafe
index 5840499e2d22ce7e7f50c63a422f8fdba39ddf59..8a8f52db7e385c28b2092f255ea07fb532fa5607 100644 (file)
@@ -216,7 +216,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
@@ -233,7 +236,6 @@ sysconfdir = $(prefix)/etc
 ETC_PERFCONFIG = etc/perfconfig
 endif
 lib = lib
-# DESTDIR=
 
 export prefix bindir sharedir sysconfdir
 
This page took 0.056215 seconds and 4 git commands to generate.