X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=blobdiff_plain;f=Makefile;fp=Makefile;h=26d4ae9fa24257a93eb5e5dd935bf08a2445b3ff;hp=6068eac7e1f6dce4265eb28e1a7895f6578ee4b7;hb=9c683d59d2f6264e1a48528438380ba656134494;hpb=3cf44b4a6bde4f5cc6c8ce22515e5a75c42dd98c diff --git a/Makefile b/Makefile index 6068eac..26d4ae9 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,11 @@ all: $(ALL) ############################## define download_target $(1): $($(1)) -.PHONY: $($(1)) +.PHONY: $(1) $($(1)): @if [ ! -e "$($(1))" ] ; then \ { echo Using primary; echo "$(WEBFETCH) $($(1)-URL1)" ; $(WEBFETCH) $($(1)-URL1) ; } || \ - { echo Using primary; echo "$(WEBFETCH) $($(1)-URL2)" ; $(WEBFETCH) $($(1)-URL2) ; } ; fi + { 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'" ; \