All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: Allow tools to be installed in a user specified location
@ 2012-10-30 17:38 Josh Boyer
  2012-10-31  5:50 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Boyer @ 2012-10-30 17:38 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-kernel, kernel-team

When building x86_energy_perf_policy or turbostat within the confines of
a packaging system such as RPM, we need to be able to have it install to
the buildroot and not the root filesystem of the build machine.  This
adds a DESTDIR variable that when set will act as a prefix for the
install location of these tools.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>

---

diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index f856495..984cc00 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -1,3 +1,5 @@
+DESTDIR ?=
+
 turbostat : turbostat.c
 CFLAGS +=	-Wall
 
@@ -5,5 +7,5 @@ clean :
 	rm -f turbostat
 
 install :
-	install turbostat /usr/bin/turbostat
-	install turbostat.8 /usr/share/man/man8
+	install turbostat ${DESTDIR}/usr/bin/turbostat
+	install turbostat.8 ${DESTDIR}/usr/share/man/man8
diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile
index f458237..f9824f0 100644
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -1,8 +1,10 @@
+DESTDIR ?= 
+
 x86_energy_perf_policy : x86_energy_perf_policy.c
 
 clean :
 	rm -f x86_energy_perf_policy
 
 install :
-	install x86_energy_perf_policy /usr/bin/
-	install x86_energy_perf_policy.8 /usr/share/man/man8/
+	install x86_energy_perf_policy ${DESTDIR}/usr/bin/
+	install x86_energy_perf_policy.8 ${DESTDIR}/usr/share/man/man8/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools: Allow tools to be installed in a user specified location
  2012-10-30 17:38 [PATCH] tools: Allow tools to be installed in a user specified location Josh Boyer
@ 2012-10-31  5:50 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2012-10-31  5:50 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linux-kernel, kernel-team

Applied.

thanks,
Len Brown, Intel Open Source Technology Center



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-31  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-30 17:38 [PATCH] tools: Allow tools to be installed in a user specified location Josh Boyer
2012-10-31  5:50 ` Len Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.