X-Git-Url: http://git.onelab.eu/?p=libvirt.git;a=blobdiff_plain;f=Makefile;h=8d1dc12f3646f04d6b168a98b88acd473ebc3ea2;hp=b473bd1eaf5e0b6303c3ef0133524f6df11c334c;hb=76b3759b9e2d513bbf518e1090c297a376b6b895;hpb=b992ab7c9272cb705235e40324e3bf063edf54d6 diff --git a/Makefile b/Makefile index b473bd1..8d1dc12 100644 --- a/Makefile +++ b/Makefile @@ -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))