Arch Linux is probably the only Linux distribution currently that points
/usr/bin/python to /usr/bin/python2. So one has to use explicitly
/usr/bin/python2 to use Python 2.

Since there is already an option in the configure script, use that
script to generate rules/pre/Rules.make from rules/pre/Rules.make.in
and install the replaced version.

Signed-off-by: Bernhard Walle <bernh...@bwalle.de>
---
 .gitignore                              |    1 +
 configure.ac                            |    1 +
 rules/pre/{Rules.make => Rules.make.in} |    2 +-
 3 files changed, 3 insertions(+), 1 deletions(-)
 rename rules/pre/{Rules.make => Rules.make.in} (99%)

diff --git a/.gitignore b/.gitignore
index 2548524..483ef50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
 /Makefile
 /.done
 /.tarball-version
+/rules/pre/Rules.make
 
 *.orig
 *.swp
diff --git a/configure.ac b/configure.ac
index 7a34e7a..474ff1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -419,6 +419,7 @@ AC_SUBST(BASH_COMPLETION_DIR)
 AC_MSG_RESULT([])
 AC_CONFIG_FILES( \
        Makefile \
+       rules/pre/Rules.make \
 )
 AC_OUTPUT
 AC_MSG_RESULT([])
diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make.in
similarity index 99%
rename from rules/pre/Rules.make
rename to rules/pre/Rules.make.in
index c531a50..b8b5d23 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make.in
@@ -323,7 +323,7 @@ HOST_ENV_PKG_CONFIG := \
        
PKG_CONFIG_LIBDIR="$(PTXDIST_SYSROOT_HOST)/lib/pkgconfig:$(PTXDIST_SYSROOT_HOST)/share/pkgconfig"
 
 HOST_ENV_PYTHONPATH    := \
-       PYTHONPATH="$(shell python -c 'import distutils.sysconfig as sysconfig; 
\
+       PYTHONPATH="$(shell @PYTHON@ -c 'import distutils.sysconfig as 
sysconfig; \
                print "%s" % 
sysconfig.get_python_lib(prefix="'"$(PTXDIST_SYSROOT_HOST)"'")')"
 
 HOST_ENV       := \
-- 
1.7.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to