Skip to contentSkip to conversation

tools/turbostat: allow user to alter DESTDIR and PREFIX

PATCH Applied Andy Shevchenko 2 participants 2 messages Jun 17, 2016 – Jul 4, 2016 Turbostat utility

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/turbostat: allow user to alter DESTDIR and PREFIX

When run
make -C tools DESTDIR=/my/nice/dir turbostat_install
get a message
install: cannot create regular file '/usr/bin/turbostat': Permission denied

Allow user to alter DESTDIR and PREFIX variables.

---
 tools/power/x86/turbostat/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/power/x86/turbostat/Makefile +2 -2
index e367b1a..8561e7d 100644
@@ -1,7 +1,7 @@
 CC		= $(CROSS_COMPILE)gcc
 BUILD_OUTPUT	:= $(CURDIR)
-PREFIX		:= /usr
-DESTDIR		:=
+PREFIX		?= /usr
+DESTDIR		?=
 
 ifeq ("$(origin O)", "command line")
 	BUILD_OUTPUT := $(O)
Signature · 1 line
2.8.1
#1 lore raw
Quoted 8 lines · Andy Shevchenko

When run
make -C tools DESTDIR=/my/nice/dir turbostat_install
get a message
install: cannot create regular file '/usr/bin/turbostat': Permission denied

Allow user to alter DESTDIR and PREFIX variables.

Applied, thanks!