X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=994cd843b46589c8fda0db746b3a51dfdb3e833d;hb=a05e5793e23b13884a2974139514ee75f765ae2f;hp=e59159baa2cb94142ba14aad3bd1e5dec5594198;hpb=79fa6ea8d411d6c2881150defcca9114515100bb;p=libvirt-python.git diff --git a/Makefile b/Makefile index e59159b..994cd84 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ WEBFETCH := wget SHA1SUM := sha1sum ALL += libvirt-python -libvirt-python-URL1 := http://mirror.onelab.eu/third-party/libvirt-python-1.2.1.tar.gz -libvirt-python-URL2 := http://planet-lab.org/third-party/libvirt-python-1.2.1.tar.gz -libvirt-python-SHA1SUM := 874014e3b1b199919d40a34f12829fa1d610a2ea +libvirt-python-URL1 := http://mirror.onelab.eu/third-party/libvirt-python-1.2.4.tar.gz +libvirt-python-URL2 := http://planet-lab.org/third-party/libvirt-python-1.2.4.tar.gz +libvirt-python-SHA1SUM := 1c41027fac688cd2d6e8ae01819acc4317352db5 libvirt-python := $(notdir $(libvirt-python-URL1)) all: $(ALL) @@ -15,18 +15,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-python))