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