1 # $Id: Makefile 16421 2010-01-04 11:29:55Z thierry $
2 # $URL: svn+ssh://thierry@svn.planet-lab.org/svn/madwifi/trunk/Makefile $
4 WEBFETCH := curl -H Pragma: -O -R -S --fail --show-error
7 REPO := http://pkg.mytestbed.net/omf-5.3-federation-v1.1/yum/base/8/i386/
10 omf-resctl-URL := $(REPO)/omf-resctl-5.3-1ubuntu2-2.noarch.rpm
11 omf-resctl-SHA1SUM := 73f65d323088d4b1f3eaf6d22a652dbac40c10e9
12 omf-resctl := $(notdir $(omf-resctl-URL))
14 omf-common-URL := $(REPO)/omf-common-5.3-1ubuntu3-2.noarch.rpm
15 omf-common-SHA1SUM := 1426245402343bc961984f7a243ea36e3415eecb
16 omf-common := $(notdir $(omf-common-URL))
18 liblog4r-URL := $(REPO)/liblog4r-ruby1.8-1.2-1.noarch.rpm
19 liblog4r-SHA1SUM := 4301cc01e65fdd1c136356ea8735ef935d997ccc
20 liblog4r := $(notdir $(liblog4r-URL))
22 libxmpp4r-URL := $(REPO)/libxmpp4r-ruby1.8-1.0-1.noarch.rpm
23 libxmpp4r-SHA1SUM := 3332f38a3de90a9e0947d50d48d955cb946eba35
24 libxmpp4r := $(notdir $(libxmpp4r-URL))
26 imagezip-URL := $(REPO)/imagezip-1.0.0-3.i386.rpm
27 imagezip-SHA1SUM := 88088ca0aed57edc2b6ad6acc65a0038486fe67e
28 imagezip := $(notdir $(imagezip-URL))
31 omf-expctl-URL := $(REPO)/omf-expctl-5.3-1ubuntu2-2.noarch.rpm
32 omf-expctl-SHA1SUM := ed8da06921ddf6870ae20ab3673276ec611106ed
33 omf-expctl := $(notdir $(omf-expctl-URL))
38 ##############################
39 define download_target
43 @if [ ! -e "$($(1))" ] ; then echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; fi
44 @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi
45 @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \
46 echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \
47 echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \
48 echo "In Makefile: $($(1)-SHA1SUM)" ; \
56 #define download_target
60 # @if [ ! -e "$($(1))" ] ; then echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; fi
61 # @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi
62 # @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \
63 # echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \
64 # echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \
65 # echo "In Makefile: $($(1)-SHA1SUM)" ; \
66 # echo "Proceeding anyway .. " ; \
74 $(eval $(call download_target,omf-resctl))
75 $(eval $(call download_target,omf-common))
76 $(eval $(call download_target,liblog4r))
77 $(eval $(call download_target,libxmpp4r))
78 $(eval $(call download_target,imagezip))
80 $(eval $(call download_target,omf-expctl))
86 #################### convenience, for debugging only
87 # make +foo : prints the value of $(foo)
88 # make ++foo : idem but verbose, i.e. foo=$(foo)
89 ++%: varname=$(subst +,,$@)
91 @echo "$(varname)=$($(varname))"
92 +%: varname=$(subst +,,$@)