python,python3: install mk files in the Host/Install phase
authorAlexandru Ardelean <redacted>
Thu, 29 Jun 2017 11:03:51 +0000 (14:03 +0300)
committerAlexandru Ardelean <redacted>
Thu, 29 Jun 2017 11:04:09 +0000 (14:04 +0300)
The Build/InstallDev rule is activated only for target builds.
But if someone needs only the host Python, then
these files need to be installed in this phase, and not Build/InstallDev

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python/Makefile
lang/python/python3/Makefile

index 1e840608788739305949a8ba357655a9a638d9d0..1d37a51d80c0dbf998cb83a07e95369df53dcca3 100644 (file)
@@ -188,7 +188,6 @@ define Build/Compile
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(STAGING_DIR)/mk/
        $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
        $(INSTALL_DATA) \
@@ -292,8 +291,18 @@ HOST_CONFIGURE_ARGS+= \
 
 define Host/Install
        $(MAKE) -C $(HOST_BUILD_DIR) install
-       $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/
+       $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/ $(STAGING_DIR)/mk/
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2
+       # Install these mk files in the Host/Install phase ;
+       # The Build/InstallDev rule is activated only for target builds.
+       # But if someone needs only the host Python, then
+       # these files need to be installed in this phase, and not Build/InstallDev
+       $(INSTALL_DATA) \
+               ./files/python-package.mk \
+               ./files/python-host.mk \
+               ./files/python-version.mk \
+               ./files/python-package-install.sh \
+               $(STAGING_DIR)/mk/
 endef
 
 $(eval $(call HostBuild))
index 5438a3ca7f6f7a7f5deea77fba6cf6e5338a5549..9e10d18063ae3411bcdbc5ffa165eee8b3704e59 100644 (file)
@@ -182,15 +182,8 @@ define Build/Compile
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(STAGING_DIR)/mk/
        $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
-       $(INSTALL_DATA) \
-               ./files/python3-package.mk \
-               ./files/python3-host.mk \
-               ./files/python3-version.mk \
-               ./files/python3-package-install.sh \
-               $(STAGING_DIR)/mk/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
@@ -279,9 +272,20 @@ endef
 define Host/Install
        $(MAKE) -C $(HOST_BUILD_DIR) install
 
-       $(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/
+       $(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/ $(STAGING_DIR)/mk/
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(HOST_PYTHON3_DIR)/bin/_freeze_importlib
+
+       # Install these mk files in the Host/Install phase ;
+       # The Build/InstallDev rule is activated only for target builds.
+       # But if someone needs only the host Python, then
+       # these files need to be installed in this phase, and not Build/InstallDev
+       $(INSTALL_DATA) \
+               ./files/python3-package.mk \
+               ./files/python3-host.mk \
+               ./files/python3-version.mk \
+               ./files/python3-package-install.sh \
+               $(STAGING_DIR)/mk/
 endef
 
 $(eval $(call HostBuild))
git clone https://git.99rst.org/PROJECT