Skip to contentSkip to conversation

perf: fix 'make help' message error

PATCH Applied Jianyu Zhan 4 participants 8 messages May 25, 2014 – Jun 5, 2014 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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. Instead, what takes effect is the "DESTDIR" variable. In this case, "DESTDIR" has a empty value, so the actual install directory falls back $HOME, not '/usr/local'.

Specifying "DESTDIR=/usr/local" will work as desired.

This patch fixes the help message.

---
 tools/perf/Makefile.perf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/Makefile.perf +2 -2
index 895edd3..37c5f90 100644
@@ -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 "make DESTDIR=<path> <install target>" to install to a particular'
+	@echo '        path like "make DESTDIR=/usr/local install install-doc"'
 	@echo '  install	- install compiled binaries'
 	@echo '  install-doc	- install *all* documentation'
 	@echo '  install-man	- install manpage documentation'
Signature · 1 line
2.0.0-rc3
#1 lore raw

Hi Jianyu,

Quoted 5 lines · Jianyu Zhan

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

Quoted 8 lines

But this is misleading, when I specify "prefix=/usr/local", it has got no respect at all. Instead, what takes effect is the "DESTDIR" variable. In this case, "DESTDIR" has a empty value, so the actual install directory falls back $HOME, not '/usr/local'.

Specifying "DESTDIR=/usr/local" will work as desired.

This patch fixes the help message.

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.

Thanks,
Namhyung

tools/perf/config/Makefile +1 -1
index 729bbdf5cec7..80a8a0a1c7e7 100644
@@ -599,7 +599,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 lore raw

Hi, Namhyung,

Quoted 3 lines

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 <[email protected]>
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.

---
 tools/perf/Makefile.perf   | 4 ++--
 tools/perf/config/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +2 -2
index 895edd3..5918063 100644
@@ -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'
tools/perf/config/Makefile +1 -1
index 802cf54..53dc11e 100644
@@ -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)
Signature · 1 line
2.0.0
#3 lore raw
Quoted 62 lines · Jianyu Zhan

Hi, Namhyung,

Quoted 3 lines

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 <[email protected]>
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.

---
 tools/perf/Makefile.perf   | 4 ++--
 tools/perf/config/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +2 -2
index 895edd3..5918063 100644
@@ -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'
tools/perf/config/Makefile +1 -1
index 802cf54..53dc11e 100644
@@ -601,7 +601,7 @@ endif
 
 
 # Make the path relative to DESTDIR, not to prefix
 ifndef DESTDIR
-prefix = $(HOME)
+prefix ?= $(HOME)
 endif
 bindir_relative = bin
Quoted 1 line

bindir = $(prefix)/$(bindir_relative)

Cc Namyung with a correct email...

Thanks,
Jianyu Zhan

Acked-by
#4 lore raw

Hi Jianyu,

Quoted 16 lines · Jianyu Zhan
Quoted 15 lines · Jianyu Zhan

Hi, Namhyung,

Quoted 3 lines

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 <[email protected]>
Date: Sat, 24 May 2014 22:34:26 +0800
Subject: [PATCH] perf: fix 'make help' message error

Currently 'make help' message has such hint:

Quoted 7 lines
Quoted 7 lines

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"

s/condiered/considered/ ?

Quoted 5 lines
Quoted 5 lines

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.

With that changed,

Thanks,
Namhyung

Quoted 40 lines
Quoted 33 lines
---
 tools/perf/Makefile.perf   | 4 ++--
 tools/perf/config/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +2 -2
index 895edd3..5918063 100644
@@ -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'
tools/perf/config/Makefile +1 -1
index 802cf54..53dc11e 100644
@@ -601,7 +601,7 @@ endif
 
 
 # Make the path relative to DESTDIR, not to prefix
 ifndef DESTDIR
-prefix = $(HOME)
+prefix ?= $(HOME)
 endif
 bindir_relative = bin
Quoted 1 line

bindir = $(prefix)/$(bindir_relative)

Cc Namyung with a correct email...

Thanks,
Jianyu Zhan

author Acked-by Namhyung Kim
#5 lore raw

Hi, Namhyung,

Quoted 4 lines · Namhyung Kim

s/condiered/considered/ ?

Oops, sorry for the typo.

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines

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.

With that changed,

Thanks. I renew the patch for maintainers to pick up.

-----8<-----
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 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.

---
 tools/perf/Makefile.perf   | 4 ++--
 tools/perf/config/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +2 -2
index 895edd3..5918063 100644
@@ -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'
tools/perf/config/Makefile +1 -1
index 802cf54..53dc11e 100644
@@ -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)
Signature · 1 line
2.0.0
Applied
#6 lore raw
Quoted 14 lines · Jianyu Zhan

Hi, Namhyung,

Quoted 4 lines · Namhyung Kim

s/condiered/considered/ ?

Oops, sorry for the typo.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

This patch fixes this issue and corrects the help message.

With that changed,

Thanks. I renew the patch for maintainers to pick up.

queued.. thanks,

jirka

#7 lore raw

[tip:perf/core] perf tools: Fix 'make help' message error

In reply to Jianyu Zhan
perf tools: Fix 'make help' message error
Commit-ID:  fc9cabeabf42d76854059e7bce81a02645e7e5ca
Gitweb:     http://git.kernel.org/tip/fc9cabeabf42d76854059e7bce81a02645e7e5ca
Author:     Jianyu Zhan <[email protected]>
AuthorDate: Tue, 3 Jun 2014 00:44:34 +0800
Committer:  Jiri Olsa <[email protected]>
CommitDate: Tue, 3 Jun 2014 21:35:12 +0200

perf tools: 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 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.

---
 tools/perf/Makefile.perf   | 4 ++--
 tools/perf/config/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +2 -2
index 6286e13..ae20edf 100644
@@ -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'
tools/perf/config/Makefile +1 -1
index 319426f..4f100b5 100644
@@ -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)