X-Git-Url: http://git.onelab.eu/?p=libvirt.git;a=blobdiff_plain;f=Makefile;h=8fc9dc219552bea4bcde4b23e818f55fd001df1a;hp=2fee1c7840ef4026e7930a3bc2cfb2648425159e;hb=d5d66c011192e9c828a50c652e3b49ba08dba256;hpb=7e1a34e8b3024a8d607a6158d8459cd2108a93ac diff --git a/Makefile b/Makefile index 2fee1c7..8fc9dc2 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,10 @@ SHA1SUM := sha1sum # tried to download this on the fly using git archive at git://libvirt.org/libvirt.git # but it feels like git archive is not supported/allowed there ALL += libvirt -libvirt-URL := http://libvirt.org/sources/libvirt-1.2.1.tar.gz -libvirt-SHA1SUM := ea8e237e0df9f1828ff4a7a649c42aa45af7ecd7 -libvirt := $(notdir $(libvirt-URL)) +libvirt-URL1 := http://mirror.onelab.eu/third-party/libvirt-1.2.5.tar.gz +libvirt-URL2 := http://planet-lab.org/third-party/libvirt-1.2.5.tar.gz +libvirt-SHA1SUM := 9153e2ea312b56be3bb16ab942ec07fd3e15cce9 +libvirt := $(notdir $(libvirt-URL1)) all: $(ALL) .PHONY: all @@ -17,7 +18,8 @@ $(1): $($(1)) .PHONY: $(1) $($(1)): @if [ ! -e "$($(1))" ] ; then \ - { echo Using primary; echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; } ; fi + { 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'" ; \ @@ -67,4 +69,3 @@ clean: +%: varname=$(subst +,,$@) +%: @echo "$($(varname))" -