python, python-*: use default prefix for host install

Also fixes a few incorrect "$(STAGING_DIR_HOST)/host" paths.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
Matthias Schiffer 2016-10-03 18:57:39 +02:00
parent 786d48aaa7
commit 205ee41506
No known key found for this signature in database
GPG key ID: 16EF3F64CB201D9C
6 changed files with 20 additions and 20 deletions

View file

@ -45,7 +45,7 @@ define Build/Compile
endef endef
define Host/Compile define Host/Compile
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host") $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef endef
define Host/Install define Host/Install

View file

@ -46,7 +46,7 @@ define Build/Compile
endef endef
define Host/Compile define Host/Compile
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host") $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef endef
define Host/Install define Host/Install

View file

@ -47,7 +47,7 @@ define Build/Compile
endef endef
define Host/Compile define Host/Compile
$(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host") $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef endef
define Host/Install define Host/Install

View file

@ -63,7 +63,7 @@ endef
define Host/Compile define Host/Compile
$(call Build/Compile/HostPyMod,,\ $(call Build/Compile/HostPyMod,,\
install --root="$(STAGING_DIR)/host" --prefix="" \ install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
--single-version-externally-managed \ --single-version-externally-managed \
) )
endef endef

View file

@ -144,13 +144,13 @@ define Build/InstallDev
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/ $(1)/usr/include/
$(CP) \ $(CP) \
$(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \ $(HOST_BUILD_PREFIX)/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/ $(1)/usr/lib/
$(CP) \ $(CP) \
$(STAGING_DIR)/host/lib/pkgconfig/python.pc \ $(HOST_BUILD_PREFIX)/lib/pkgconfig/python.pc \
$(STAGING_DIR)/host/lib/pkgconfig/python2.pc \ $(HOST_BUILD_PREFIX)/lib/pkgconfig/python2.pc \
$(STAGING_DIR)/host/lib/pkgconfig/python-$(PYTHON_VERSION).pc \ $(HOST_BUILD_PREFIX)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
$(1)/usr/lib/pkgconfig $(1)/usr/lib/pkgconfig
$(CP) \ $(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
@ -221,20 +221,20 @@ HOST_CONFIGURE_ARGS+= \
--without-cxx-main \ --without-cxx-main \
--without-pymalloc \ --without-pymalloc \
--with-threads \ --with-threads \
--prefix=$(STAGING_DIR)/host \ --prefix=$(HOST_BUILD_PREFIX) \
--exec-prefix=$(STAGING_DIR)/host \ --exec-prefix=$(HOST_BUILD_PREFIX) \
--sysconfdir=$(STAGING_DIR_HOST)/host/etc \ --sysconfdir=$(HOST_BUILD_PREFIX)/etc \
--localstatedir=$(STAGING_DIR)/host/var \ --localstatedir=$(HOST_BUILD_PREFIX)/var \
--sbindir=$(STAGING_DIR)/host/bin \ --sbindir=$(HOST_BUILD_PREFIX)/bin \
--with-system-expat=$(STAGING_DIR)/host \ --with-system-expat=$(HOST_BUILD_PREFIX) \
--with-system-ffi=$(STAGING_DIR)/host \ --with-system-ffi=$(HOST_BUILD_PREFIX) \
CONFIG_SITE= \ CONFIG_SITE= \
CFLAGS="$(HOST_CFLAGS)" CFLAGS="$(HOST_CFLAGS)"
define Host/Install define Host/Install
$(INSTALL_DIR) $(STAGING_DIR)/host/bin/
$(MAKE) -C $(HOST_BUILD_DIR) install $(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen2 $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_BUILD_PREFIX)/bin/pgen2
endef endef
$(eval $(call HostBuild)) $(eval $(call HostBuild))

View file

@ -5,7 +5,7 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
HOST_PYTHON_DIR:=$(STAGING_DIR)/host HOST_PYTHON_DIR:=$(HOST_BUILD_PREFIX)
HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION) HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION) HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
@ -13,7 +13,7 @@ HOST_PYTHON_PKG_DIR:=/lib/python$(PYTHON_VERSION)/site-packages
HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION) HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR)/host/$(HOST_PYTHON_PKG_DIR) HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_BUILD_PREFIX)/$(HOST_PYTHON_PKG_DIR)
define HostPython define HostPython
if [ "$(strip $(3))" == "HOST" ]; then \ if [ "$(strip $(3))" == "HOST" ]; then \
@ -44,7 +44,7 @@ define Build/Compile/HostPyMod
LDSHARED="$(HOSTCC) -shared" \ LDSHARED="$(HOSTCC) -shared" \
CFLAGS="$(HOST_CFLAGS)" \ CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \ CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(HOST_BUILD_PREFIX)/lib" \
_PYTHON_HOST_PLATFORM=linux2 \ _PYTHON_HOST_PLATFORM=linux2 \
$(3) \ $(3) \
, \ , \