summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2009-04-05 09:54:24 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2009-04-05 09:54:24 (GMT)
commit3bd8d6ee1732893adc41246d5d240664309a17d6 (patch)
tree9a64dd3494a0f57b4f4c7df4c7b325ae1571b0fb /Makefile
parent030623efb3c565883ef62d9bd8054255848df890 (diff)
downloadmxe-3bd8d6ee1732893adc41246d5d240664309a17d6.zip
mxe-3bd8d6ee1732893adc41246d5d240664309a17d6.tar.gz
mxe-3bd8d6ee1732893adc41246d5d240664309a17d6.tar.bz2
improved download mechanism
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6299a6a..0fa916d 100644
--- a/Makefile
+++ b/Makefile
@@ -57,9 +57,6 @@ UNPACK_ARCHIVE = \
UNPACK_PKG_ARCHIVE = \
$(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE))
-DOWNLOAD = \
- $(if $(2),wget -T 30 -t 3 -c '$(1)' || wget -c '$(2)',wget -c '$(1)')
-
.PHONY: all
all: $(PKG_RULES)
@@ -71,7 +68,10 @@ $(PREFIX)/installed-$(1): $(TOP_DIR)/src/$(1).mk $(addprefix $(PREFIX)/installed
[ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)'
cd '$(PKG_DIR)' && ( \
$(call CHECK_ARCHIVE,$($(1)_FILE)) || \
- $(call DOWNLOAD,$($(1)_URL),$($(1)_URL_2)) )
+ $(if $($(1)_URL_2), \
+ wget -T 30 -t 3 -c -O '$($(1)_FILE)' '$($(1)_URL)' || \
+ wget -c -O '$($(1)_FILE)' '$($(1)_URL_2)', \
+ wget -c -O '$($(1)_FILE)' '$($(1)_URL)'))
$(if $(value $(1)_BUILD),
rm -rf '$(2)'
mkdir -p '$(2)'