public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: linux-pm@vger.kernel.org
Cc: rafael@kernel.org, Len Brown <len.brown@intel.com>
Subject: tools/x86_energy_perf_policy: Make destination directories overridable via env variable
Date: Fri, 25 Sep 2020 17:16:38 +0200	[thread overview]
Message-ID: <1677754.PRGFiW9HIp@c100> (raw)

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
 




                 reply	other threads:[~2020-09-25 15:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1677754.PRGFiW9HIp@c100 \
    --to=trenn@suse.de \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@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