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
@@ -11,6 +11,7 @@ EXTRA_LIBS ?= -ldl	# for get_cpu
 DESTDIR	?=
 prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
+sbindir ?= $(prefix)/sbin
 mandir	?= $(prefix)/share/man
 srcdir	?= $(prefix)/src
 
@@ -24,8 +25,6 @@ CFLAGS ?= -Wall -Wno-nonnull
 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
@@ -124,11 +123,7 @@ install: all
 	mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
 	mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8"
 	cp $(TARGETS) "$(DESTDIR)$(bindir)"
-	if test -n "$(PYLIB)" ; then \
-		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" ; \
-	fi
+	install -D -m 755 src/hwlatdetect/hwlatdetect.py "$(DESTDIR)$(sbindir)/hwlatdetect"
 	install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
 	install -m 644 src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire/Makefile"
 	gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
