From: Josh Boyer Date: Tue, 30 Oct 2012 17:38:05 +0000 (-0400) Subject: tools: Allow tools to be installed in a user specified location X-Git-Tag: next-20121102~77^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b63cb742e185caf39cc0238d151076a6d06832c5;p=karo-tx-linux.git tools: Allow tools to be installed in a user specified location 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 Signed-off-by: Len Brown --- diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile index 51880e8467b3..e79f7947b254 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 f458237fdd79..971c9ffdcb50 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/