tools: Allow tools to be installed in a user specified location
authorJosh Boyer <jwboyer@redhat.com>
Tue, 30 Oct 2012 17:38:05 +0000 (13:38 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 30 Nov 2012 06:09:45 +0000 (01:09 -0500)
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/x86_energy_perf_policy/Makefile

index f458237fdd79f6e1bca440a1dded7778402730b8..971c9ffdcb504ad8172758849aa5f0156f010bd9 100644 (file)
@@ -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/