Merge branch 'master' of ssh://git.onelab.eu/git/sfa
[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 EXTENSIONS := png
43
44 ####################
45 ALL += $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))))
46 ALL += $(foreach bundle,$(BUNDLES-LR),$(word 2,$(subst @, ,$(bundle)))-lr)
47
48 all: $(ALL)
49
50 ####################
51 define bundle_scan_target
52 $(word 2,$(subst @, ,$(1))):
53         ./sfascan.py $(foreach extension,$(EXTENSIONS),-o $(word 2,$(subst @, ,$(1))).$(extension)) $(word 1,$(subst @, ,$(1))) >& .$(word 2,$(subst @, ,$(1))).out
54 .PHONY: $(word 2,$(subst @, ,$(1)))
55 endef
56
57 # the actual targets
58 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_scan_target,$(bundle))))
59
60 #################### same but left-to-right
61 define bundle_scan_target_lr
62 $(word 2,$(subst @, ,$(1)))-lr:
63         ./sfascan.py -l $(foreach extension,$(EXTENSIONS),-o $(word 2,$(subst @, ,$(1)))-lr.$(extension)) $(word 1,$(subst @, ,$(1))) >& .$(word 2,$(subst @, ,$(1)))-lr.out
64 .PHONY: $(word 2,$(subst @, ,$(1)))-lr
65 endef
66
67 # the actual targets
68 $(foreach bundle,$(BUNDLES-LR),$(eval $(call bundle_scan_target_lr,$(bundle))))
69
70 ####################
71 versions: $(VERSIONS)
72 clean-versions: 
73         rm -f $(VERSIONS)
74
75 #################### make name.version
76 define bundle_version_target
77 $(word 2,$(subst @, ,$(1))).version:
78         -./sfi.py -s $(word 1,$(subst @, ,$(1))) version >& $$@
79 endef
80
81 VERSIONS := $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))).version)
82
83 # the actual targets
84 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_version_target,$(bundle))))
85
86 ####################
87 clean:
88         rm -f auto-*.{out,version}
89         $(foreach extension,$(EXTENSIONS),rm -rf auto-*.$(extension);)
90
91 PUBEXTENSIONS=png
92 publish:
93         $(foreach extension,$(PUBEXTENSIONS),rsync -av auto-*.$(extension) tparment@srv-planete.inria.fr:/proj/planete/www/Thierry.Parmentelat/sfascan/ ;)
94
95 #################### convenience, for debugging only
96 # make +foo : prints the value of $(foo)
97 # make ++foo : idem but verbose, i.e. foo=$(foo)
98 ++%: varname=$(subst +,,$@)
99 ++%:
100         @echo "$(varname)=$($(varname))"
101 +%: varname=$(subst +,,$@)
102 +%:
103         @echo "$($(varname))"