]> granicus.if.org Git - python/commitdiff
- Issue #17031: Fix running regen in cross builds.
authordoko@python.org <doko@python.org>
Fri, 25 Jan 2013 17:45:12 +0000 (18:45 +0100)
committerdoko@python.org <doko@python.org>
Fri, 25 Jan 2013 17:45:12 +0000 (18:45 +0100)
Lib/plat-generic/regen
Makefile.pre.in
Misc/NEWS
configure
configure.ac

index a20cdc15182a33661447f5c543bfce5a9ef08606..c96167dcb0e3590be269e85066babe2587aced13 100755 (executable)
@@ -1,3 +1,3 @@
 #! /bin/sh
 set -v
-python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
+eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" /usr/include/netinet/in.h
index 8883461601769beabdb58d6db0fa672a11564d19..716de12669642a587fc1b3b55b8b4146d993a737 100644 (file)
@@ -203,7 +203,8 @@ BUILDPYTHON=        python$(BUILDEXE)
 
 PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
 _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
-HOST_GNU_TYPE=  @host@
+BUILD_GNU_TYPE=        @build@
+HOST_GNU_TYPE= @host@
 
 # The task to run while instrument when building the profile-opt target
 PROFILE_TASK=  $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
@@ -1123,6 +1124,12 @@ $(srcdir)/Lib/$(PLATDIR):
        export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
        export EXE; EXE="$(BUILDEXE)"; \
        if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
+       export PYTHON_FOR_BUILD; \
+       if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
+         PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
+       else \
+         PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
+       fi; \
        cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
 
 python-config: $(srcdir)/Misc/python-config.in
index f5428bdee56d7db8aea9123be460a9d50e0bceee..891d179b4d99e0c4ed00dd8c6f73eb52a0bc6ec7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -539,6 +539,8 @@ Tests
 Build
 -----
 
+- Issue #17031: Fix running regen in cross builds.
+
 - Issue #3754: fix typo in pthread AC_CACHE_VAL.
 
 - Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;
index 255aa2c44cce8594c5d3ccf4f84a4e37f8477f87..941771077aa2e5f2d1a8b398155e87964e4e9441 100755 (executable)
--- a/configure
+++ b/configure
@@ -2926,6 +2926,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
+
+
 if test "$cross_compiling" = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
 $as_echo_n "checking for python interpreter for cross build... " >&6; }
index 75eb5da02eaf8b7e5527ef2a2e082ccda2a03f3c..5526f99ce95e6edea7db4dfce596e3e80d67faf5 100644 (file)
@@ -50,6 +50,8 @@ AC_CONFIG_SRCDIR([Include/object.h])
 AC_CONFIG_HEADER(pyconfig.h)
 
 AC_CANONICAL_HOST
+AC_SUBST(build)
+AC_SUBST(host)
 
 if test "$cross_compiling" = yes; then
     AC_MSG_CHECKING([for python interpreter for cross build])