420543fb81fc483964deef21d217fa4ff86020a3
[sfa.git] / sfa / client / Makefile
1 # recompute the SFA graphs from different locations
2
3 BUNDLES += http://planet-lab.eu:12345/@auto-ple-reg 
4 BUNDLES += http://planet-lab.eu:12347/@auto-ple-sa
5 BUNDLES += http://planet-lab.org:12345/@auto-plc-reg 
6 BUNDLES += http://planet-lab.org:12347/@auto-plc-sa
7 BUNDLES += http://planet-lab.kr:12345/@auto-ppk-reg 
8 BUNDLES += http://planet-lab.kr:12347/@auto-ppk-sa
9 BUNDLES += http://www.planet-lab.jp:12345/@auto-plj-reg 
10 BUNDLES += http://www.planet-lab.jp:12347/@auto-plj-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
18 # dont output svg yet
19 #EXTENSIONS := png svg
20 EXTENSIONS := png 
21
22 define bundle_scan_target
23 $(word 2,$(subst @, ,$(1))):
24         ./sfascan.py -e $(word 1,$(subst @, ,$(1))) $(foreach extension,$(EXTENSIONS),-o $(word 2,$(subst @, ,$(1))).$(extension)) >& $(word 2,$(subst @, ,$(1))).out
25 .PHONY: $(word 2,$(subst @, ,$(1)))
26 endef
27
28 ALL := $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))))
29
30 all: $(ALL)
31
32 # the actual targets
33 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_scan_target,$(bundle))))
34
35 ####################
36
37 define bundle_version_target
38 $(word 2,$(subst @, ,$(1))).version:
39         -./sfi.py -s $(word 1,$(subst @, ,$(1))) version >& $$@
40 endef
41
42 VERSIONS := $(foreach bundle,$(BUNDLES),$(word 2,$(subst @, ,$(bundle))).version)
43
44 versions: $(VERSIONS)
45 clean-versions: 
46         rm -f $(VERSIONS)
47
48 # the actual targets
49 $(foreach bundle,$(BUNDLES),$(eval $(call bundle_version_target,$(bundle))))
50
51
52 #################### convenience, for debugging only
53 # make +foo : prints the value of $(foo)
54 # make ++foo : idem but verbose, i.e. foo=$(foo)
55 ++%: varname=$(subst +,,$@)
56 ++%:
57         @echo "$(varname)=$($(varname))"
58 +%: varname=$(subst +,,$@)
59 +%:
60         @echo "$($(varname))"