diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2018-06-29 14:40:46 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2018-07-05 01:30:57 +0800 |
commit | 9009efa18b45b4b573111fafa777f7b642486e3e (patch) | |
tree | c9be626b1ba5f98ce0cb2cb6214ca43286716ebc | |
parent | 04b9f8587370f96366c6e53fb411473279ba7c02 (diff) | |
download | upstream-9009efa18b45b4b573111fafa777f7b642486e3e.tar.gz upstream-9009efa18b45b4b573111fafa777f7b642486e3e.tar.bz2 upstream-9009efa18b45b4b573111fafa777f7b642486e3e.zip |
download.mk: enable DownloadMethod/github_archive
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
-rw-r--r-- | include/download.mk | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/download.mk b/include/download.mk index 1627b4fdfb..33141910fc 100644 --- a/include/download.mk +++ b/include/download.mk @@ -19,17 +19,23 @@ endif DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) +define dl_method_git +$(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git) +endef + # Try to guess the download method from the URL define dl_method $(strip \ - $(if $(2),$(2), \ - $(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, \ - $(if $(filter hg://%,$(1)),hg, \ - $(if $(filter sftp://%,$(1)),bzr, \ - unknown \ + $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)), + $(if $(2),$(2), \ + $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \ + $(if $(filter svn://%,$(1)),svn, \ + $(if $(filter cvs://%,$(1)),cvs, \ + $(if $(filter hg://%,$(1)),hg, \ + $(if $(filter sftp://%,$(1)),bzr, \ + unknown \ + ) \ ) \ ) \ ) \ |