blob: bd6070910e288d228488ddf535cbe1da576a97c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Subject: rt-tests: install hwlatdetect directly into $sbindir
The python_lib directory is only for importable modules. As hwlatdetect
needs root privileges install it into $sbindir.
---
Makefile | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -26,14 +26,13 @@
DESTDIR ?=
prefix ?= /usr/local
bindir ?= $(prefix)/bin
+sbindir ?= $(prefix)/sbin
mandir ?= $(prefix)/share/man
CFLAGS ?= -Wall -Wno-nonnull
CPPFLAGS += -D_GNU_SOURCE -Isrc/include
LDFLAGS ?=
-PYLIB ?= $(shell python3 -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_lib())')
-
ifndef DEBUG
CFLAGS += -O2 -g
else
@@ -196,13 +195,9 @@
.PHONY: install_hwlatdetect
install_hwlatdetect: hwlatdetect
- if test -n "$(PYLIB)" ; then \
- mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man8" ; \
- install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
- rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
- ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
- gzip -c src/hwlatdetect/hwlatdetect.8 >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz" ; \
- fi
+ mkdir -p "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(mandir)/man8"
+ install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(sbindir)/hwlatdetect
+ gzip -c src/hwlatdetect/hwlatdetect.8 >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz"
.PHONY: tarball
tarball:
|