diff options
author | Tony Theodore <tonyt@logyst.com> | 2017-11-13 00:20:54 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2017-11-13 00:20:54 (GMT) |
commit | 75417437a250371ca4a947b1394515341e37feb5 (patch) | |
tree | b6ff27337729d9e96ae87c570520328e82fa090b /Makefile | |
parent | b82080ec4d304e096d7bbd6a023838ac691d2b87 (diff) | |
download | mxe-75417437a250371ca4a947b1394515341e37feb5.zip mxe-75417437a250371ca4a947b1394515341e37feb5.tar.gz mxe-75417437a250371ca4a947b1394515341e37feb5.tar.bz2 |
Makefile and s3: add mxe mirror and tidy output
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -17,9 +17,12 @@ MXE_TARGETS := i686-w64-mingw32.static DEFAULT_MAX_JOBS := 6 SOURCEFORGE_MIRROR := downloads.sourceforge.net +MXE_MIRROR := https://mirror.mxe.cc/pkg PKG_MIRROR := https://s3.amazonaws.com/mxe-pkg PKG_CDN := http://d1yihgixbnrglp.cloudfront.net GITLAB_BACKUP := https://gitlab.com/starius/mxe-backup2/raw/master +# reorder as required, ensuring final one is a http fallback +MIRROR_SITES := GITLAB_BACKUP MXE_MIRROR PKG_MIRROR PKG_CDN PWD := $(shell pwd) SHELL := bash @@ -271,9 +274,8 @@ ESCAPE_PKG = \ BACKUP_DOWNLOAD = \ (echo "MXE Warning! Downloading $(1) from backup." >&2 && \ - ($(WGET) -O '$(TMP_FILE)' $(GITLAB_BACKUP)/`$(call ESCAPE_PKG,$(1))`_$($(1)_CHECKSUM) || \ - $(WGET) -O '$(TMP_FILE)' $(PKG_MIRROR)/`$(call ESCAPE_PKG,$(1))`_$($(1)_CHECKSUM) || \ - $(WGET) -O '$(TMP_FILE)' $(PKG_CDN)/`$(call ESCAPE_PKG,$(1))`_$($(1)_CHECKSUM))) + ($(foreach SITE,$(MIRROR_SITES), \ + $(WGET) -O '$(TMP_FILE)' $($(SITE))/`$(call ESCAPE_PKG,$(1))`_$($(1)_CHECKSUM) || ) false)) DOWNLOAD_PKG_ARCHIVE = \ $(eval TMP_FILE := $(PKG_DIR)/.tmp-$($(1)_FILE)) \ @@ -516,7 +518,7 @@ download-only-$($(1)_FILE):: @$$(if $$(REMOVE_DOWNLOAD),rm -f '$(PKG_DIR)/$($(1)_FILE)') @if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ $(PRINTF_FMT) '[download]' '$(1)' | $(RTRIM); \ - (set -x; $(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \ + ($(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \ grep 'MXE Warning' '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \ ln -sf '$(TIMESTAMP)/$(1)-download' '$(LOG_DIR)/$(1)-download'; \ if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ |