summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-08-30 03:27:12 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-08-30 03:27:12 (GMT)
commit3209c4556691af7ce3b14a049b6614a68d624429 (patch)
treedc940fd121c23988390d21a0d0abd252affdc184 /Makefile
parentcb79a6fe9732d319c6e57bb05586cbdef3b63ec2 (diff)
downloadmxe-3209c4556691af7ce3b14a049b6614a68d624429.zip
mxe-3209c4556691af7ce3b14a049b6614a68d624429.tar.gz
mxe-3209c4556691af7ce3b14a049b6614a68d624429.tar.bz2
Add MXE_NO_BACKUP_DL mode for regression testing
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 33fbfb8..4ea539e 100644
--- a/Makefile
+++ b/Makefile
@@ -155,16 +155,18 @@ CHECK_PKG_ARCHIVE = \
ESCAPE_PKG = \
echo '$($(1)_FILE)' | perl -lpe 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($$$$1))/seg'
+BACKUP_DOWNLOAD = \
+ $(WGET) -O- $(PKG_MIRROR)/`$(call ESCAPE_PKG,$(1))` || \
+ $(WGET) -O- $(PKG_CDN)/`$(call ESCAPE_PKG,$(1))`
+
DOWNLOAD_PKG_ARCHIVE = \
- mkdir -p '$(PKG_DIR)' && \
- $(if $($(1)_URL_2), \
- ( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || \
- $(WGET) -T 30 -t 3 -O- '$($(1)_URL_2)' || \
- $(WGET) -O- $(PKG_MIRROR)/`$(call ESCAPE_PKG,$(1))` || \
- $(WGET) -O- $(PKG_CDN)/`$(call ESCAPE_PKG,$(1))` ), \
- ( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || \
- $(WGET) -O- $(PKG_MIRROR)/`$(call ESCAPE_PKG,$(1))` || \
- $(WGET) -O- $(PKG_CDN)/`$(call ESCAPE_PKG,$(1))` )) \
+ mkdir -p '$(PKG_DIR)' && ( \
+ $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' \
+ $(if $($(1)_URL_2), \
+ || $(WGET) -T 30 -t 3 -O- '$($(1)_URL_2)') \
+ $(if $(MXE_NO_BACKUP_DL),, \
+ || $(BACKUP_DOWNLOAD)) \
+ ) \
$(if $($(1)_FIX_GZIP), \
| gzip -d | gzip -9n, \
) \