perf tools: Fix 'make help' message error
authorJianyu Zhan <nasa4836@gmail.com>
Mon, 2 Jun 2014 16:44:34 +0000 (00:44 +0800)
committerJiri Olsa <jolsa@kernel.org>
Tue, 3 Jun 2014 19:35:12 +0000 (21:35 +0200)
Currently 'make help' message has such hint:

   use "make prefix=<path> <install target>" to install to a particular
       path like make prefix=/usr/local install install-doc

But this is misleading, when I specify "prefix=/usr/local", it has got no
respect at all.

This is because that, "DESTDIR" is considered first. In this case, "DESTDIR"
has an empty value, so "prefix" is honored. However, "prefix" is unconditionally
assigned to $HOME, regardless of what it is set to from command line. So our
"prefix" setting got no respect and the actual destination falls back to $HOME.

This patch fixes this issue and corrects the help message.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1401727474-19370-1-git-send-email-nasa4836@gmail.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
tools/perf/Makefile.perf
tools/perf/config/Makefile

index 6286e13adc2ec028024e869ab3872ed90ab6c392..ae20edfcc3f7e3a61b683a60882ed4239a4bb581 100644 (file)
@@ -789,8 +789,8 @@ help:
        @echo ''
        @echo 'Perf install targets:'
        @echo '  NOTE: documentation build requires asciidoc, xmlto packages to be installed'
-       @echo '  HINT: use "make prefix=<path> <install target>" to install to a particular'
-       @echo '        path like make prefix=/usr/local install install-doc'
+       @echo '  HINT: use "prefix" or "DESTDIR" to install to a particular'
+       @echo '        path like "make prefix=/usr/local install install-doc"'
        @echo '  install        - install compiled binaries'
        @echo '  install-doc    - install *all* documentation'
        @echo '  install-man    - install manpage documentation'
index 319426f632fccf963fbf8e73a745f1a3e0e7b5e9..4f100b54ba8bf0a352c9db0ac2f9d7b6f719343d 100644 (file)
@@ -600,7 +600,7 @@ endif
 
 # Make the path relative to DESTDIR, not to prefix
 ifndef DESTDIR
-prefix = $(HOME)
+prefix ?= $(HOME)
 endif
 bindir_relative = bin
 bindir = $(prefix)/$(bindir_relative)
This page took 0.045246 seconds and 5 git commands to generate.