X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fhost-build.mk;h=4bac6801470801d01728ab078dcc76a92e2bef11;hb=7c057371eb54d49444cec7cb96a2f6beed21295e;hp=1a794846bbf1b4cc40d20e793d4c7d85c76b4e6f;hpb=729e0fa4d14af178431415abab3f4349d517cdd4;p=oweals%2Fopenwrt.git diff --git a/include/host-build.mk b/include/host-build.mk index 1a794846bb..4bac680147 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -13,7 +13,7 @@ include $(INCLUDE_DIR)/unpack.mk include $(INCLUDE_DIR)/depends.mk BUILD_TYPES += host -HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPEND),))) +HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))) HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.$(PKG_NAME)_installed @@ -89,7 +89,7 @@ endef ifneq ($(if $(HOST_QUILT),,$(CONFIG_AUTOREBUILD)),) define HostHost/Autoclean - $(call rdep,${CURDIR} $(PKG_FILE_DEPEND),$(HOST_STAMP_PREPARED)) + $(call rdep,${CURDIR} $(PKG_FILE_DEPENDS),$(HOST_STAMP_PREPARED)) $(if $(if $(Host/Compile),$(filter prepare,$(MAKECMDGOALS)),1),,$(call rdep,$(HOST_BUILD_DIR),$(HOST_STAMP_BUILT))) endef endif @@ -103,6 +103,14 @@ define Download/default MD5SUM:=$(PKG_MD5SUM) endef +define Host/Exports/Default + $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*),-I $$(p)) + $(1) : export STAGING_PREFIX=$$(STAGING_DIR_HOST) + $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig + $(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig +endef +Host/Exports=$(Host/Exports/Default) + ifndef DUMP define HostBuild $(if $(HOST_QUILT),$(Host/Quilt)) @@ -115,12 +123,12 @@ ifndef DUMP $(call Host/Prepare) touch $$@ - $(HOST_STAMP_CONFIGURED) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig - $(HOST_STAMP_CONFIGURED) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig + $(call Host/Exports,$(HOST_STAMP_CONFIGURED)) $(HOST_STAMP_CONFIGURED): $(HOST_STAMP_PREPARED) $(call Host/Configure) touch $$@ + $(call Host/Exports,$(HOST_STAMP_BUILT)) $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED) $(call Host/Compile) touch $$@