@@ -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
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(-)