* tools/x86_energy_perf_policy: Make destination directories overridable via env variable
@ 2020-09-25 15:16 Thomas Renninger
0 siblings, 0 replies; only message in thread
From: Thomas Renninger @ 2020-09-25 15:16 UTC (permalink / raw)
To: linux-pm; +Cc: rafael, Len Brown
cmp with other tools/../Makefiles:
tools/lib/bpf/Makefile
tools/lib/traceevent/Makefile
...
and consolidate 2 install calls to one without any functional change.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
tools/power/x86/x86_energy_perf_policy/Makefile | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -1,8 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
CC = $(CROSS_COMPILE)gcc
-BUILD_OUTPUT := $(CURDIR)
-PREFIX := /usr
-DESTDIR :=
+BUILD_OUTPUT ?= $(CURDIR)
+PREFIX ?= /usr
+mandir ?= $(PREFIX)/share/man
+DESTDIR ?=
ifeq ("$(origin O)", "command line")
BUILD_OUTPUT := $(O)
@@ -22,8 +23,6 @@
@rm -f $(BUILD_OUTPUT)/x86_energy_perf_policy
install : x86_energy_perf_policy
- install -d $(DESTDIR)$(PREFIX)/bin
- install $(BUILD_OUTPUT)/x86_energy_perf_policy $(DESTDIR)$(PREFIX)/bin/x86_energy_perf_policy
- install -d $(DESTDIR)$(PREFIX)/share/man/man8
- install -m 644 x86_energy_perf_policy.8 $(DESTDIR)$(PREFIX)/share/man/man8
+ install -D $(BUILD_OUTPUT)/x86_energy_perf_policy $(DESTDIR)$(PREFIX)/bin/x86_energy_perf_policy
+ install -D -m 644 x86_energy_perf_policy.8 $(DESTDIR)$(mandir)/man8/x86_energy_perf_policy.8
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-25 15:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-25 15:16 tools/x86_energy_perf_policy: Make destination directories overridable via env variable Thomas Renninger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox