X-Git-Url: http://git.onelab.eu/?p=libvirt.git;a=blobdiff_plain;f=Makefile;h=7c1549b731a1f1c1a3f1e47904254189f45bc097;hp=b473bd1eaf5e0b6303c3ef0133524f6df11c334c;hb=258521b65bc460cbbc0436d6f649c16bd12c246d;hpb=b992ab7c9272cb705235e40324e3bf063edf54d6 diff --git a/Makefile b/Makefile index b473bd1..7c1549b 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ 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-URL1 := http://mirror.onelab.eu/third-party/libvirt-1.2.1.tar.gz -libvirt-URL2 := http://planet-lab.org/third-party/libvirt-1.2.1.tar.gz -libvirt-SHA1SUM := ea8e237e0df9f1828ff4a7a649c42aa45af7ecd7 +libvirt-URL1 := http://mirror.onelab.eu/third-party/libvirt-1.2.3.tar.gz +libvirt-URL2 := http://planet-lab.org/third-party/libvirt-1.2.3.tar.gz +libvirt-SHA1SUM := 36763621a430674312fdd08a9c367517e9a2e82e libvirt := $(notdir $(libvirt-URL1)) all: $(ALL) @@ -17,18 +17,18 @@ define download_target $(1): $($(1)) .PHONY: $(1) $($(1)): - @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'" ; \ - echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \ - echo "In Makefile: $($(1)-SHA1SUM)" ; \ - false ; \ - else \ - ls -l $($(1)) ; \ - 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'" ; \ + echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \ + echo "In Makefile: $($(1)-SHA1SUM)" ; \ + false ; \ + else \ + ls -l $($(1)) ; \ + fi endef $(eval $(call download_target,libvirt))