[PATCH 1/6] lirc-make-devinput: avoid using python interpreter

[email protected] Wed, 27 May 2026 15:28:58 +0300
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
From: Doron Behar <[email protected]>

---
 Makefile.am              | 3 +--
 tools/lirc-make-devinput | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 1b089d0b..c5cd4df2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -214,8 +214,7 @@ devinput.lircd.conf:
 	echo "# Rename to devinput.lircd.dist if not using devinput driver" > $@
 	echo "# Re-generate for current kernel using lirc-make-devinput" >> $@
 	echo '#' >> $@
-	PYTHON=$(PYTHON) \
-	    $(srcdir)/tools/lirc-make-devinput $(DEVINPUT_HEADER) >> $@
+	$(srcdir)/tools/lirc-make-devinput $(DEVINPUT_HEADER) >> $@
 
 .phony:
 
diff --git a/tools/lirc-make-devinput b/tools/lirc-make-devinput
index c37b5e1a..026fa706 100755
--- a/tools/lirc-make-devinput
+++ b/tools/lirc-make-devinput
@@ -12,13 +12,10 @@ used when building lirc.
 
 input.h path defaults to /usr/include/linux/input.h, often in
 the kernel-headers package.
-
-Script uses the python interpreter defined by the PYTHON
-environment variable, falling back to 'python'
 EOF
 }
 
-here=$(dirname $(${PYTHON:-'python'} -c "import os; print(os.path.realpath(\"$0\"))"))
+here=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
 
 # Use gnu-sed if available
 if which gsed &>/dev/null; then SED=gsed; else SED=sed; fi
-- 
2.54.0