summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-07-17 23:04:41 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-07-17 23:04:41 +0200
commit83cfdd1f7228cd630dedc204807ed7ed39f360c6 (patch)
treec69d944c7275d105133012a232619de5541b860e
parent44e4ea701b6b4493e046538689453a393d6db92b (diff)
downloadembtoolkit-83cfdd1f7228cd630dedc204807ed7ed39f360c6.tar.gz
embtoolkit-83cfdd1f7228cd630dedc204807ed7ed39f360c6.tar.bz2
embtoolkit-83cfdd1f7228cd630dedc204807ed7ed39f360c6.tar.xz
Build system: tweak embtk_wget
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--mk/macros.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/mk/macros.mk b/mk/macros.mk
index eeb34ab..18f9a1d 100644
--- a/mk/macros.mk
+++ b/mk/macros.mk
@@ -62,12 +62,15 @@ __embtk_mk_strcmp=$(shell [ $(strip $(1)) = $(strip $(2)) ] && echo y)
# wget wrapper
# usage: $(call embtk_wget,$(OUTPUT_FILE),$(SITE),$(FOREIGN_FILE))
#
-__wget_opts = --tries=5 --timeout=10 --waitretry=5
+__wget_outfile = $(patsubst %/,%,$(DOWNLOAD_DIR))/$(strip $(1))
+__wget_remotesite = $(patsubst %/,%,$(strip $(2)))
+__wget_foreignfiles = $(strip $(3))
+__wget_opts = --tries=5 --timeout=10 --waitretry=5
define embtk_wget
- wget $(__wget_opts) -O $(DOWNLOAD_DIR)/$(strip $(1)) \
- $(strip $(2))/$(strip $(3)) || \
- wget $(__WGET_OPTS) --no-passive-ftp -O \
- $(DOWNLOAD_DIR)/$(strip $(1)) $(strip $(2))/$(strip $(3))
+ wget $(__wget_opts) -O $(__wget_outfile) \
+ $(__wget_remotesite)/$(__wget_foreignfiles) || \
+ wget $(__wget_opts) --no-passive-ftp -O $(__wget_outfile) \
+ $(__wget_remotesite)/$(__wget_foreignfiles)
endef
#Decompress message