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 |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,12 @@
 DESTDIR	?=
 prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
+sbindir ?= $(prefix)/sbin
 mandir	?= $(prefix)/share/man
 srcdir	?= $(prefix)/src
 
 CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
 
-PYLIB  := $(shell python -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
-
 ifndef DEBUG
 	CFLAGS	+= -O2
 else
@@ -112,12 +111,9 @@
 install: all
 	mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
 	mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8"
+	mkdir -p "$(DESTDIR)$(sbindir)"
 	cp $(TARGETS) "$(DESTDIR)$(bindir)"
-	if test -n "$(PYLIB)" ; then \
-		mkdir -p "$(DESTDIR)$(PYLIB)" ; \
-		install -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
-		ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
-	fi
+	install -m 755 src/hwlatdetect/hwlatdetect.py "$(DESTDIR)$(sbindir)/hwlatdetect"
 	mkdir -p "$(DESTDIR)$(srcdir)/backfire"
 	install -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
 	gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
