GENICLOUD-16
[sfa.git] / sfa / client / Makefile
1 # recompute the SFA graphs from different locations
2
3 #BUNDLES += http://planet-lab.eu:12346/@auto-ple-am
4 BUNDLES += http://planet-lab.eu:12345/@auto-ple-reg 
5 BUNDLES += http://planet-lab.eu:12347/@auto-ple-sa
6 BUNDLES += http://planet-lab.org:12345/@auto-plc-reg 
7 BUNDLES += http://planet-lab.org:12347/@auto-plc-sa
8 BUNDLES += http://planet-lab.kr:12345/@auto-ppk-reg 
9 BUNDLES += http://planet-lab.kr:12347/@auto-ppk-sa
10 BUNDLES += http://www.emulab.net:443/protogeni/xmlrpc/am/@auto-emulab-am
11 BUNDLES += http://geni-myvini.umkc.gpeni.net:12345/@auto-gpeni-reg
12 BUNDLES += http://geni-myvini.umkc.gpeni.net:12347/@auto-gpeni-sa
13 BUNDLES += http://198.248.241.100:12345/@auto-glc-reg
14 BUNDLES += http://198.248.241.100:12347/@auto-glc-sa
15 BUNDLES += http://vini-veritas.net:12345/@auto-vini-reg
16 BUNDLES += http://vini-veritas.net:12347/@auto-vini-sa
17 BUNDLES += http://www.planet-lab.jp:12345/@auto-plj-reg 
18 BUNDLES += http://www.planet-lab.jp:12347/@auto-plj-sa
19 BUNDLES += http://www.emanicslab.org:12345/@auto-elc-reg 
20 BUNDLES += http://www.emanicslab.org:12347/@auto-elc-sa
21
22 # dont output svg yet
23 #EXTENSIONS := png svg
24 EXTENSIONS := png 
25
26 define bundle_scan_target
27 $(word 2,$(subst @, ,$(1))):
28         ./sfascan.py $(foreach extension,$(EXTENSIONS),-o $(word 2,$(subst @, ,$(1))).$(extension)) $(word 1,$(subst @, ,$(1))) >& $(word 2,$(subst @, ,$(1))).out
29 .PHONY: $(word 2,$(subst @, ,$(1)))
30 endef
31
32 ALL := $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))))
33
34 all: $(ALL)
35
36 # the actual targets
37 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_scan_target,$(bundle))))
38
39 ####################
40
41 define bundle_version_target
42 $(word 2,$(subst @, ,$(1))).version:
43         -./sfi.py -s $(word 1,$(subst @, ,$(1))) version >& $$@
44 endef
45
46 VERSIONS := $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))).version)
47
48 versions: $(VERSIONS)
49 clean-versions: 
50         rm -f $(VERSIONS)
51
52 # the actual targets
53 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_version_target,$(bundle))))
54
55 clean:
56         rm -f auto-*.{out,version}
57         $(foreach extension,$(EXTENSIONS),rm -rf auto-*.$(extension);)
58
59 #################### convenience, for debugging only
60 # make +foo : prints the value of $(foo)
61 # make ++foo : idem but verbose, i.e. foo=$(foo)
62 ++%: varname=$(subst +,,$@)
63 ++%:
64         @echo "$(varname)=$($(varname))"
65 +%: varname=$(subst +,,$@)
66 +%:
67         @echo "$($(varname))"