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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Makefile |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@
 DESTDIR	?=
 prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
+sbindir ?= $(prefix)/sbin
 mandir	?= $(prefix)/share/man
 srcdir	?= $(prefix)/src
 
@@ -30,8 +31,6 @@
 CPPFLAGS += -D_GNU_SOURCE -Isrc/include
 LDFLAGS ?=
 
-PYLIB  ?= $(shell python -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
-
 ifndef DEBUG
 	CFLAGS	+= -O2
 else
@@ -180,13 +179,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:
