diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-07-17 23:48:31 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-07-17 23:48:31 +0200 |
commit | 2cf72e5eb34c615006983d7dba2924ee0e6c5c56 (patch) | |
tree | 4b3816e6c887e51f6d1c1fa0d7c9351ff63f829c /mk/macros.mk | |
parent | 151f8bc05206f4e3f3641c2dd28970642d00cde5 (diff) | |
parent | 688d2f92fd3fb280dc55f25f6e86dade8fc22845 (diff) | |
download | embtoolkit-2cf72e5eb34c615006983d7dba2924ee0e6c5c56.tar.gz embtoolkit-2cf72e5eb34c615006983d7dba2924ee0e6c5c56.tar.bz2 embtoolkit-2cf72e5eb34c615006983d7dba2924ee0e6c5c56.tar.xz |
Merge branch 'master' into embtk-0.1.0-rc14-dev
Diffstat (limited to 'mk/macros.mk')
-rw-r--r-- | mk/macros.mk | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mk/macros.mk b/mk/macros.mk index 519c26a..4ae3164 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 |