diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-09-29 00:05:48 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-09-29 00:05:48 +0000 |
commit | 8d169cc962910f9f00e83effcb37772e8100e2d2 (patch) | |
tree | bf49528f12e9948445013655180dae0caabd6cf5 /include/package.mk | |
parent | eb77c1aa6ef079d6903d6d224f6c278df46b4d1f (diff) | |
download | upstream-8d169cc962910f9f00e83effcb37772e8100e2d2.tar.gz upstream-8d169cc962910f9f00e83effcb37772e8100e2d2.tar.bz2 upstream-8d169cc962910f9f00e83effcb37772e8100e2d2.zip |
Refactor downloading code into download.mk
Support multiple file downloads
Support svn downloads
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9057 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/package.mk')
-rw-r--r-- | include/package.mk | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/package.mk b/include/package.mk index 2b93972f24..bf82c60458 100644 --- a/include/package.mk +++ b/include/package.mk @@ -20,6 +20,7 @@ STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call f STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured STAMP_BUILT:=$(PKG_BUILD_DIR)/.built +include $(INCLUDE_DIR)/download.mk include $(INCLUDE_DIR)/quilt.mk include $(INCLUDE_DIR)/package-defaults.mk include $(INCLUDE_DIR)/package-dumpinfo.mk @@ -38,18 +39,16 @@ ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),) endif endif +define Download/default + FILE:=$(PKG_SOURCE) + URL:=$(PKG_SOURCE_URL) + PROTO:=$(PKG_SOURCE_PROTO) + VERSION:=$(PKG_SOURCE_VERSION) + MD5SUM:=$(PKG_MD5SUM) +endef define Build/DefaultTargets - ifneq ($(strip $(PKG_SOURCE_URL)),) - 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 - + $(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)) $(call Build/Autoclean) $(STAMP_PREPARED): |