diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index c0953118..3ec3aa66 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -71,7 +71,7 @@ TARGET_CONFIGURE_OPTS = \ --mandir=$(REMOVE_mandir) \ --infodir=$(REMOVE_infodir) -define TARGET_CONFIGURE_CMDS +define TARGET_CONFIGURE_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ test -f ./$($(PKG)_CONFIGURE_CMD) || ./autogen.sh && \ CONFIG_SITE=/dev/null \ @@ -129,7 +129,7 @@ HOST_CONFIGURE_OPTS = \ --prefix=$(HOST_DIR) \ --sysconfdir=$(HOST_DIR)/etc -define HOST_CONFIGURE_CMDS +define HOST_CONFIGURE_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ test -f ./$($(PKG)_CONFIGURE_CMD) || ./autogen.sh && \ CONFIG_SITE=/dev/null \ diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index 415366ea..e2bcc75b 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -44,7 +44,7 @@ TARGET_CMAKE_OPTS += \ -DCMAKE_READELF="$(TARGET_READELF)" \ -DCMAKE_STRIP="$(TARGET_STRIP)" -define TARGET_CMAKE_CMDS +define TARGET_CMAKE_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ rm -f CMakeCache.txt; \ $(TARGET_CMAKE_ENV) $($(PKG)_CONF_ENV) \ @@ -91,7 +91,7 @@ HOST_CMAKE_OPTS += \ -DCMAKE_INSTALL_PREFIX="$(HOST_DIR)" \ -DCMAKE_PREFIX_PATH="$(HOST_DIR)" -define HOST_CMAKE_CMDS +define HOST_CMAKE_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ rm -f CMakeCache.txt; \ $(HOST_CMAKE_ENV) $($(PKG)_CONF_ENV) \ diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index d96f7ff5..2b6a0683 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -6,7 +6,7 @@ TARGET_MAKE_ENV = -define TARGET_MAKE_BUILD_CMDS +define TARGET_MAKE_BUILD_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) \ $($(PKG)_MAKE) $($(PKG)_MAKE_ARGS)\ @@ -20,7 +20,7 @@ define TARGET_MAKE_BUILD $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) endef -define TARGET_MAKE_INSTALL_CMDS +define TARGET_MAKE_INSTALL_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(TARGET_MAKE_ENV) $($(PKG)_MAKE_INSTALL_ENV) \ $($(PKG)_MAKE_INSTALL) $($(PKG)_MAKE_INSTALL_ARGS) DESTDIR=$(TARGET_DIR) \ @@ -48,7 +48,7 @@ endef HOST_MAKE_ENV = -define HOST_MAKE_BUILD_CMDS +define HOST_MAKE_BUILD_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(HOST_MAKE_ENV) $($(PKG)_MAKE_ENV) \ $($(PKG)_MAKE) $($(PKG)_MAKE_ARGS)\ @@ -62,7 +62,7 @@ define HOST_MAKE_BUILD $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) endef -define HOST_MAKE_INSTALL_CMDS +define HOST_MAKE_INSTALL_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(HOST_MAKE_ENV) $($(PKG)_MAKE_INSTALL_ENV) \ $($(PKG)_MAKE_INSTALL) $($(PKG)_MAKE_INSTALL_ARGS) \ diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 347f41a4..fabf3b65 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -42,7 +42,7 @@ endef # ----------------------------------------------------------------------------- -define TARGET_MESON_CMDS +define TARGET_MESON_CMDS_DEFAULT unset CC CXX CPP LD AR NM STRIP; \ $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $($(PKG)_CONF_ENV) \ @@ -63,7 +63,7 @@ define TARGET_MESON_CONFIGURE $(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep)) endef -define TARGET_NINJA_BUILD_CMDS +define TARGET_NINJA_BUILD_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(TARGET_MAKE_ENV) $($(PKG)_NINJA_ENV) \ $(HOST_NINJA_BINARY) -C $(PKG_BUILD_DIR)/build \ @@ -77,7 +77,7 @@ define TARGET_NINJA_BUILD $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) endef -define TARGET_NINJA_INSTALL_CMDS +define TARGET_NINJA_INSTALL_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(TARGET_MAKE_ENV) $($(PKG)_NINJA_ENV) \ DESTDIR=$(TARGET_DIR) \ @@ -105,7 +105,7 @@ endef # ----------------------------------------------------------------------------- -define HOST_MESON_CMDS +define HOST_MESON_CMDS_DEFAULT unset CC CXX CPP LD AR NM STRIP; \ PKG_CONFIG=/usr/bin/pkg-config \ PKG_CONFIG_PATH=$(HOST_DIR)/lib/pkgconfig \ @@ -125,7 +125,7 @@ define HOST_MESON_CONFIGURE $(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep)) endef -define HOST_NINJA_BUILD_CMDS +define HOST_NINJA_BUILD_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(HOST_MAKE_ENV) $($(PKG)_NINJA_ENV) \ $(HOST_NINJA_BINARY) -C $(PKG_BUILD_DIR)/build \ @@ -139,7 +139,7 @@ define HOST_NINJA_BUILD $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) endef -define HOST_NINJA_INSTALL_CMDS +define HOST_NINJA_INSTALL_CMDS_DEFAULT $(CHDIR)/$($(PKG)_DIR)/$($(PKG)_SUBDIR); \ $(HOST_MAKE_ENV) $($(PKG)_NINJA_ENV) \ $(HOST_NINJA_BINARY) -C $(PKG_BUILD_DIR)/build install \ diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index abba8310..d59770d3 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -63,21 +63,21 @@ endif ifndef $(PKG)_CONFIGURE_CMDS ifeq ($(PKG_MODE),CMAKE) ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_CONFIGURE_CMDS = $$(HOST_CMAKE_CMDS) + $(PKG)_CONFIGURE_CMDS = $$(HOST_CMAKE_CMDS_DEFAULT) else - $(PKG)_CONFIGURE_CMDS = $$(TARGET_CMAKE_CMDS) + $(PKG)_CONFIGURE_CMDS = $$(TARGET_CMAKE_CMDS_DEFAULT) endif else ifeq ($(PKG_MODE),MESON) ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_CONFIGURE_CMDS = $$(HOST_MESON_CMDS) + $(PKG)_CONFIGURE_CMDS = $$(HOST_MESON_CMDS_DEFAULT) else - $(PKG)_CONFIGURE_CMDS = $$(TARGET_MESON_CMDS) + $(PKG)_CONFIGURE_CMDS = $$(TARGET_MESON_CMDS_DEFAULT) endif else ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_CONFIGURE_CMDS = $$(HOST_CONFIGURE_CMDS) + $(PKG)_CONFIGURE_CMDS = $$(HOST_CONFIGURE_CMDS_DEFAULT) else - $(PKG)_CONFIGURE_CMDS = $$(TARGET_CONFIGURE_CMDS) + $(PKG)_CONFIGURE_CMDS = $$(TARGET_CONFIGURE_CMDS_DEFAULT) endif endif endif @@ -101,15 +101,15 @@ endif ifndef $(PKG)_BUILD_CMDS ifeq ($(PKG_MODE),$(filter $(PKG_MODE),AUTOTOOLS CMAKE GENERIC KCONFIG)) ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_BUILD_CMDS = $$(HOST_MAKE_BUILD_CMDS) + $(PKG)_BUILD_CMDS = $$(HOST_MAKE_BUILD_CMDS_DEFAULT) else - $(PKG)_BUILD_CMDS = $$(TARGET_MAKE_BUILD_CMDS) + $(PKG)_BUILD_CMDS = $$(TARGET_MAKE_BUILD_CMDS_DEFAULT) endif else ifeq ($(PKG_MODE),$(filter $(PKG_MODE),MESON)) ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_BUILD_CMDS = $$(HOST_NINJA_BUILD_CMDS) + $(PKG)_BUILD_CMDS = $$(HOST_NINJA_BUILD_CMDS_DEFAULT) else - $(PKG)_BUILD_CMDS = $$(TARGET_NINJA_BUILD_CMDS) + $(PKG)_BUILD_CMDS = $$(TARGET_NINJA_BUILD_CMDS_DEFAULT) endif else $(PKG)_BUILD_CMDS = echo "$(PKG_NO_BUILD)" @@ -135,15 +135,15 @@ endif ifndef $(PKG)_INSTALL_CMDS ifeq ($(PKG_MODE),$(filter $(PKG_MODE),AUTOTOOLS CMAKE GENERIC KCONFIG)) ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_INSTALL_CMDS = $$(HOST_MAKE_INSTALL_CMDS) + $(PKG)_INSTALL_CMDS = $$(HOST_MAKE_INSTALL_CMDS_DEFAULT) else - $(PKG)_INSTALL_CMDS = $$(TARGET_MAKE_INSTALL_CMDS) + $(PKG)_INSTALL_CMDS = $$(TARGET_MAKE_INSTALL_CMDS_DEFAULT) endif else ifeq ($(PKG_MODE),$(filter $(PKG_MODE),MESON)) ifeq ($(PKG_HOST_PACKAGE),YES) - $(PKG)_INSTALL_CMDS = $$(HOST_NINJA_INSTALL_CMDS) + $(PKG)_INSTALL_CMDS = $$(HOST_NINJA_INSTALL_CMDS_DEFAULT) else - $(PKG)_INSTALL_CMDS = $$(TARGET_NINJA_INSTALL_CMDS) + $(PKG)_INSTALL_CMDS = $$(TARGET_NINJA_INSTALL_CMDS_DEFAULT) endif else $(PKG)_INSTALL_CMDS = echo "$(PKG_NO_INSTALL)"