Browse Source

- rename default defines to avoid conflicts with target names

master
vanhofen 3 years ago
parent
commit
d319d3387d
  1. 4
      package/pkg-autotools.mk
  2. 4
      package/pkg-cmake.mk
  3. 8
      package/pkg-generic.mk
  4. 12
      package/pkg-meson.mk
  5. 28
      package/pkg-utils.mk

4
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 \

4
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) \

8
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) \

12
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 \

28
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)"

Loading…
Cancel
Save