Merge branch 'master' into eucalyptus-devel
[sfa.git] / sfa / client / Makefile
1 # recompute the SFA graphs from different locations
2
3 # AMs, at least MyPLC AMs, are boring
4 #BUNDLES += http://planet-lab.eu:12346/@auto-ple-am
5 BUNDLES += http://planet-lab.eu:12345/@auto-ple-reg 
6 BUNDLES += http://planet-lab.eu:12347/@auto-ple-sa
7 BUNDLES += http://planet-lab.org:12345/@auto-plc-reg 
8 BUNDLES += http://planet-lab.org:12347/@auto-plc-sa
9 BUNDLES += http://planet-lab.kr:12345/@auto-ppk-reg 
10 BUNDLES += http://planet-lab.kr:12347/@auto-ppk-sa
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 # left to right
23 BUNDLES-LR += http://www.emulab.net:443/protogeni/xmlrpc/am/@auto-emulab-am
24 BUNDLES-LR += http://planet-lab.eu:12345/@auto-ple-reg 
25 BUNDLES-LR += http://planet-lab.eu:12347/@auto-ple-sa
26 BUNDLES-LR += http://planet-lab.org:12345/@auto-plc-reg 
27 BUNDLES-LR += http://planet-lab.org:12347/@auto-plc-sa
28 BUNDLES-LR += http://planet-lab.kr:12345/@auto-ppk-reg 
29 #BUNDLES-LR += http://planet-lab.kr:12347/@auto-ppk-sa
30 BUNDLES-LR += http://geni-myvini.umkc.gpeni.net:12345/@auto-gpeni-reg
31 BUNDLES-LR += http://geni-myvini.umkc.gpeni.net:12347/@auto-gpeni-sa
32 BUNDLES-LR += http://198.248.241.100:12345/@auto-glc-reg
33 BUNDLES-LR += http://198.248.241.100:12347/@auto-glc-sa
34 BUNDLES-LR += http://vini-veritas.net:12345/@auto-vini-reg
35 BUNDLES-LR += http://vini-veritas.net:12347/@auto-vini-sa
36 BUNDLES-LR += http://www.planet-lab.jp:12345/@auto-plj-reg 
37 BUNDLES-LR += http://www.planet-lab.jp:12347/@auto-plj-sa
38 BUNDLES-LR += http://www.emanicslab.org:12345/@auto-elc-reg 
39 BUNDLES-LR += http://www.emanicslab.org:12347/@auto-elc-sa
40
41 EXTENSIONS := png svg
42
43 ####################
44 ALL += $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))))
45 ALL += $(foreach bundle,$(BUNDLES-LR),$(word 2,$(subst @, ,$(bundle)))-lr)
46
47 all: $(ALL)
48
49 ####################
50 define bundle_scan_target
51 $(word 2,$(subst @, ,$(1))):
52         ./sfascan.py $(foreach extension,$(EXTENSIONS),-o $(word 2,$(subst @, ,$(1))).$(extension)) $(word 1,$(subst @, ,$(1))) >& $(word 2,$(subst @, ,$(1))).out
53 .PHONY: $(word 2,$(subst @, ,$(1)))
54 endef
55
56 # the actual targets
57 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_scan_target,$(bundle))))
58
59 #################### same but left-to-right
60 define bundle_scan_target_lr
61 $(word 2,$(subst @, ,$(1)))-lr:
62         ./sfascan.py -l $(foreach extension,$(EXTENSIONS),-o $(word 2,$(subst @, ,$(1)))-lr.$(extension)) $(word 1,$(subst @, ,$(1))) >& $(word 2,$(subst @, ,$(1)))-lr.out
63 .PHONY: $(word 2,$(subst @, ,$(1)))-lr
64 endef
65
66 # the actual targets
67 $(foreach bundle,$(BUNDLES-LR),$(eval $(call bundle_scan_target_lr,$(bundle))))
68
69 ####################
70 versions: $(VERSIONS)
71 clean-versions: 
72         rm -f $(VERSIONS)
73
74 #################### make name.version
75 define bundle_version_target
76 $(word 2,$(subst @, ,$(1))).version:
77         -./sfi.py -s $(word 1,$(subst @, ,$(1))) version >& $$@
78 endef
79
80 VERSIONS := $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))).version)
81
82 # the actual targets
83 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_version_target,$(bundle))))
84
85 ####################
86 clean:
87         rm -f auto-*.{out,version}
88         $(foreach extension,$(EXTENSIONS),rm -rf auto-*.$(extension);)
89
90 PUBEXTENSIONS=png
91 publish:
92         $(foreach extension,$(PUBEXTENSIONS),rsync -av auto-*.$(extension) tparment@srv-planete.inria.fr:/proj/planete/www/Thierry.Parmentelat/sfascan/ ;)
93
94 #################### convenience, for debugging only
95 # make +foo : prints the value of $(foo)
96 # make ++foo : idem but verbose, i.e. foo=$(foo)
97 ++%: varname=$(subst +,,$@)
98 ++%:
99         @echo "$(varname)=$($(varname))"
100 +%: varname=$(subst +,,$@)
101 +%:
102         @echo "$($(varname))"