kernel: allow subtarget specific KernelPackage
[librecmc/librecmc.git] / include / host-build.mk
index d353c88b5ca5d2e5c9b310b58a407461c65b7ed9..f6ca3ff21eca306992b78676bbda3d5533a6e1e8 100644 (file)
@@ -5,6 +5,8 @@
 # See /LICENSE for more information.
 #
 
+include $(INCLUDE_DIR)/download.mk
+
 HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
 HOST_INSTALL_DIR ?= $(HOST_BUILD_DIR)/host-install
 HOST_BUILD_PARALLEL ?=
@@ -35,7 +37,6 @@ HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
 
 override MAKEFLAGS=
 
-include $(INCLUDE_DIR)/download.mk
 include $(INCLUDE_DIR)/quilt.mk
 include $(INCLUDE_DIR)/autotools.mk
 
@@ -123,16 +124,6 @@ ifneq ($(if $(HOST_QUILT),,$(CONFIG_AUTOREBUILD)),)
   endef
 endif
 
-define Download/default
-  FILE:=$(PKG_SOURCE)
-  URL:=$(PKG_SOURCE_URL)
-  PROTO:=$(PKG_SOURCE_PROTO)
-  SUBDIR:=$(PKG_SOURCE_SUBDIR)
-  VERSION:=$(PKG_SOURCE_VERSION)
-  MD5SUM:=$(PKG_MD5SUM)
-  MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM)
-endef
-
 define Host/Exports/Default
   $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*)),-I $$(p))
   $(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
@@ -146,9 +137,8 @@ Host/Exports=$(Host/Exports/Default)
 .NOTPARALLEL:
 
 ifndef DUMP
-  define HostBuild
+  define HostBuild/Core
   $(if $(HOST_QUILT),$(Host/Quilt))
-  $(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
   $(if $(DUMP),,$(call HostHost/Autoclean))
 
   $(HOST_STAMP_PREPARED):
@@ -208,3 +198,8 @@ ifndef DUMP
   clean:
 
 endif
+
+define HostBuild
+  $(HostBuild/Core)
+  $(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
+endef