X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=include%2Fdownload.mk;h=a3595140026e6ac060b858d8508d28704bf01a42;hb=70d0a15768079a9d6bbf905f3fa99724b40e5608;hp=c551647e0e8bb11b8e80732fbacf6867ac794004;hpb=2b5d321713f120664c6517265b6fd434a414465a;p=openwrt.git diff --git a/include/download.mk b/include/download.mk index c551647e0e..a359514002 100644 --- a/include/download.mk +++ b/include/download.mk @@ -5,13 +5,15 @@ # See /LICENSE for more information. # +OPENWRT_GIT = http://git.openwrt.org + DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) # Try to guess the download method from the URL define dl_method $(strip \ $(if $(2),$(2), \ - $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),git, \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ @@ -46,7 +48,7 @@ define DownloadMethod/default endef define wrap_mirror - $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "" "$(MIRROR_MD5SUM)" || ( $(1) ),$(1)) +$(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" "" || ( $(1) ),$(1)) endef define DownloadMethod/cvs @@ -88,8 +90,9 @@ define DownloadMethod/git cd $(TMP_DIR)/dl && \ rm -rf $(SUBDIR) && \ [ \! -d $(SUBDIR) ] && \ - git clone $(URL) $(SUBDIR) --recursive && \ - (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \ + git clone $(URL) $(SUBDIR) && \ + (cd $(SUBDIR) && git checkout $(VERSION) && \ + git submodule update --init --recursive) && \ echo "Packing checkout..." && \ rm -rf $(SUBDIR)/.git && \ $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \ @@ -180,6 +183,6 @@ define Download $(DL_DIR)/$(FILE): mkdir -p $(DL_DIR) - $(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown)) + $(call locked,$(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown)),$(FILE)) endef