linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jianyu Zhan <nasa4836@gmail.com>
To: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
	acme@kernel.org, jolsa@kernel.org, jean.pihet@linaro.org
Cc: linux-kernel@vger.kernel.org, nasa4836@gmail.com
Subject: Re: [PATCH] perf: fix 'make help' message error
Date: Tue,  3 Jun 2014 00:44:34 +0800	[thread overview]
Message-ID: <1401727474-19370-1-git-send-email-nasa4836@gmail.com> (raw)
In-Reply-To: <87sintf4lj.fsf@sejong.aot.lge.com>

Hi, Namhyung,

>I don't know what's the correct way to do this.  But it seems like the
>prefix was overwritten when given from user, so below patch will work
>also.

This does work too. So I update the patch as below:

---8<---
From: Jianyu Zhan <nasa4836@gmail.com>
Date: Sat, 24 May 2014 22:34:26 +0800
Subject: [PATCH] perf: fix 'make help' message error

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 condiered 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>
---
 tools/perf/Makefile.perf   | 4 ++--
 tools/perf/config/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 895edd3..5918063 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -784,8 +784,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'
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 802cf54..53dc11e 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -601,7 +601,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)
-- 
2.0.0


  reply	other threads:[~2014-06-02 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25  4:50 [PATCH] perf: fix 'make help' message error Jianyu Zhan
2014-05-29  7:04 ` Namhyung Kim
2014-06-02 16:44   ` Jianyu Zhan [this message]
2014-06-02 16:53     ` Jianyu Zhan
2014-06-03  2:51       ` Namhyung Kim
2014-06-03  3:10         ` Jianyu Zhan
2014-06-03 12:03           ` Jiri Olsa
2014-06-05 14:32     ` [tip:perf/core] perf tools: Fix " tip-bot for Jianyu Zhan
  -- strict thread matches above, loose matches on Subject: below --
2014-05-28  1:18 [PATCH] perf: fix " Jianyu Zhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401727474-19370-1-git-send-email-nasa4836@gmail.com \
    --to=nasa4836@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=jean.pihet@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).