X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=71eb967ad74879f077b7e619cd068a4497691f4d;hb=f6ffac75646780c4d0474fd27c9d11e15e59036f;hp=d677f03221dc7a653892336c6f8393408a763e34;hpb=47b3e7b724c892f0821c43ad15d643bb944e3488;p=util-vserver.git diff --git a/Makefile b/Makefile index d677f03..71eb967 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ -# $Id$ -# $URL$ # WEBFETCH := wget SHA1SUM := sha1sum ALL += util-vserver -util-vserver-URL := http://build.planet-lab.org/third-party/util-vserver-0.30.216-pre2924.tar.bz2 -util-vserver-SHA1SUM := 7dd700ce0a6b52afb23eda2d0378ff8ac7cbfead -util-vserver := $(notdir $(util-vserver-URL)) +util-vserver := util-vserver-0.30.216-pre3004.tar.bz2 +util-vserver-SHA1SUM := 9d2565dde57ff583dda35357a2542b87a5817d61 +util-vserver-URL1 := http://build.planet-lab.org/third-party/$(util-vserver) +util-vserver-URL2 := http://mirror.onelab.eu/third-party/$(util-vserver) all: $(ALL) .PHONY: all @@ -15,9 +14,11 @@ all: $(ALL) ############################## define download_target $(1): $($(1)) -.PHONY: $($(1)) +.PHONY: $(1) $($(1)): - @if [ ! -e "$($(1))" ] ; then echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; fi + @if [ ! -e "$($(1))" ] ; then \ + { echo Using primary; echo "$(WEBFETCH) $($(1)-URL1)" ; $(WEBFETCH) $($(1)-URL1) ; } || \ + { echo Using secondary; echo "$(WEBFETCH) $($(1)-URL2)" ; $(WEBFETCH) $($(1)-URL2) ; } ; fi @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \ echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \