mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Josh Boyer <jwboyer@redhat.com>,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 5/7] tools: Allow tools to be installed in a user specified location
Date: Wed, 14 Nov 2012 15:43:22 -0500	[thread overview]
Message-ID: <b63cb742e185caf39cc0238d151076a6d06832c5.1352925508.git.len.brown@intel.com> (raw)
In-Reply-To: <1352925804-6746-1-git-send-email-lenb@kernel.org>
In-Reply-To: <39300ffb9b6666714c60735cf854e1280e4e75f4.1352925508.git.len.brown@intel.com>

From: Josh Boyer <jwboyer@redhat.com>

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>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 tools/power/x86/turbostat/Makefile              | 6 ++++--
 tools/power/x86/x86_energy_perf_policy/Makefile | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index 51880e8..e79f794 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -1,3 +1,5 @@
+DESTDIR ?=
+
 turbostat : turbostat.c
 CFLAGS +=	-Wall
 CFLAGS +=	-I../../../../arch/x86/include/
@@ -6,5 +8,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..971c9ff 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/
-- 
1.8.0


  parent reply	other threads:[~2012-11-14 20:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 20:43 turbostat tool update for Linux-3.8 Len Brown
2012-11-14 20:43 ` [PATCH 1/7] tools/power turbostat: Repair Segmentation fault when using -i option Len Brown
2012-11-14 20:43   ` [PATCH 2/7] tools/power turbostat: graceful fail on garbage input Len Brown
2012-11-14 20:43   ` [PATCH 3/7] tools/power/x86/turbostat: use kernel MSR #defines Len Brown
2012-11-14 20:43   ` [PATCH 4/7] x86 power: define RAPL MSRs Len Brown
2012-11-14 20:43   ` Len Brown [this message]
2012-11-14 20:43   ` [PATCH 6/7] tools/power turbostat: prevent infinite loop on migration error path Len Brown
2012-11-14 20:43   ` [PATCH 7/7] tools/power turbostat: print Watts Len Brown
2012-11-15 20:50     ` Betty Dall
2012-11-15 20:37 ` turbostat tool update for Linux-3.8 Betty Dall
2012-12-17 18:34   ` Len Brown

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=b63cb742e185caf39cc0238d151076a6d06832c5.1352925508.git.len.brown@intel.com \
    --to=lenb@kernel.org \
    --cc=jwboyer@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.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

all inboxes | Powered by JetHome®