aboutsummaryrefslogtreecommitdiffstats
path: root/include/host-build.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-09-29 00:05:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-09-29 00:05:48 +0000
commitdbeb0fad24ac37bc07e21e1cac4d372493f4fb28 (patch)
tree3a72c42d3ba9f57ee240c2e93f4233e05dd611c1 /include/host-build.mk
parent5d4112737d4c1169f85069fd9f5830266a03b28b (diff)
downloadupstream-dbeb0fad24ac37bc07e21e1cac4d372493f4fb28.tar.gz
upstream-dbeb0fad24ac37bc07e21e1cac4d372493f4fb28.tar.bz2
upstream-dbeb0fad24ac37bc07e21e1cac4d372493f4fb28.zip
Refactor downloading code into download.mk Support multiple file downloads Support svn downloads
SVN-Revision: 9057
Diffstat (limited to 'include/host-build.mk')
-rw-r--r--include/host-build.mk25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 88129aad07..c0d62148e8 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -19,6 +19,7 @@ STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.$(PKG_NAME)_installed
override MAKEFLAGS=
+include $(INCLUDE_DIR)/download.mk
include $(INCLUDE_DIR)/quilt.mk
Build/Patch:=$(Build/Patch/Default)
@@ -69,17 +70,6 @@ define Build/Compile
$(call Build/Compile/Default)
endef
-
-ifneq ($(strip $(PKG_SOURCE)),)
- download: $(DL_DIR)/$(PKG_SOURCE)
-
- $(DL_DIR)/$(PKG_SOURCE):
- mkdir -p $(DL_DIR)
- $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
-
- $(STAMP_PREPARED): $(DL_DIR)/$(PKG_SOURCE)
-endif
-
ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)
define HostBuild/Autoclean
$(call rdep,${CURDIR} $(PKG_FILE_DEPEND),$(STAMP_PREPARED))
@@ -87,10 +77,17 @@ ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)
endef
endif
+define Download/default
+ FILE:=$(PKG_SOURCE)
+ URL:=$(PKG_SOURCE_URL)
+ PROTO:=$(PKG_SOURCE_PROTO)
+ VERSION:=$(PKG_SOURCE_VERSION)
+ MD5SUM:=$(PKG_MD5SUM)
+endef
+
define HostBuild
- ifeq ($(DUMP),)
- $(call HostBuild/Autoclean)
- endif
+ $(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))
+ $(if $(DUMP),,$(call HostBuild/Autoclean))
$(STAMP_PREPARED):
@-rm -rf $(PKG_BUILD_DIR)