package/pkg-python.mk: split the commands in a target and host section
Only define the _CMDS variables that are relevant for the target resp. host variant. Duplicate the _BUILD_CMDS. This will allow us to differentiate part of the _BUILD_CMDS definition in a follow-up patch. Signed-off-by: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
parent
ba27abf356
commit
aae25fb55e
@ -324,6 +324,7 @@ $(2)_DOWNLOAD_POST_PROCESS = cargo
|
||||
$(2)_DOWNLOAD_DEPENDENCIES = host-rustc
|
||||
endif # SETUP_TYPE
|
||||
|
||||
ifeq ($(4),target)
|
||||
#
|
||||
# Build step. Only define it if not already defined by the package .mk
|
||||
# file.
|
||||
@ -338,20 +339,6 @@ define $(2)_BUILD_CMDS
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Host installation step. Only define it if not already defined by the
|
||||
# package .mk file.
|
||||
#
|
||||
ifndef $(2)_INSTALL_CMDS
|
||||
define $(2)_INSTALL_CMDS
|
||||
(cd $$($$(PKG)_BUILDDIR)/; \
|
||||
$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
|
||||
$$(HOST_DIR)/bin/python3 \
|
||||
$$($$(PKG)_BASE_INSTALL_CMD) \
|
||||
$$($$(PKG)_INSTALL_OPTS))
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Target installation step. Only define it if not already defined by
|
||||
# the package .mk file.
|
||||
@ -380,6 +367,38 @@ define $(2)_INSTALL_STAGING_CMDS
|
||||
endef
|
||||
endif
|
||||
|
||||
else # host
|
||||
|
||||
#
|
||||
# Host build step. Only define it if not already defined by the package .mk
|
||||
# file.
|
||||
#
|
||||
ifndef $(2)_BUILD_CMDS
|
||||
define $(2)_BUILD_CMDS
|
||||
(cd $$($$(PKG)_BUILDDIR)/; \
|
||||
$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
|
||||
$$(HOST_DIR)/bin/python3 \
|
||||
$$($$(PKG)_BASE_BUILD_CMD) \
|
||||
$$($$(PKG)_BUILD_OPTS))
|
||||
endef
|
||||
endif
|
||||
|
||||
#
|
||||
# Host installation step. Only define it if not already defined by the
|
||||
# package .mk file.
|
||||
#
|
||||
ifndef $(2)_INSTALL_CMDS
|
||||
define $(2)_INSTALL_CMDS
|
||||
(cd $$($$(PKG)_BUILDDIR)/; \
|
||||
$$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \
|
||||
$$(HOST_DIR)/bin/python3 \
|
||||
$$($$(PKG)_BASE_INSTALL_CMD) \
|
||||
$$($$(PKG)_INSTALL_OPTS))
|
||||
endef
|
||||
endif
|
||||
|
||||
endif # host / target
|
||||
|
||||
# Call the generic package infrastructure to generate the necessary
|
||||
# make targets
|
||||
$(call inner-generic-package,$(1),$(2),$(3),$(4))
|
||||
|
Loading…
Reference in New Issue
Block a user