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 | dbeb0fad24ac37bc07e21e1cac4d372493f4fb28 (patch) | |
tree | 3a72c42d3ba9f57ee240c2e93f4233e05dd611c1 /include/package.mk | |
parent | 5d4112737d4c1169f85069fd9f5830266a03b28b (diff) | |
download | mtk-20170518-dbeb0fad24ac37bc07e21e1cac4d372493f4fb28.zip mtk-20170518-dbeb0fad24ac37bc07e21e1cac4d372493f4fb28.tar.gz mtk-20170518-dbeb0fad24ac37bc07e21e1cac4d372493f4fb28.tar.bz2 |
Refactor downloading code into download.mk Support multiple file downloads Support svn downloads
SVN-Revision: 9057
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 2b93972..bf82c60 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): |