From 93cf050b0c97bdd2cc9e37ce94a84faa07e999a5 Mon Sep 17 00:00:00 2001 From: Giuseppe Lettieri Date: Wed, 5 Sep 2012 19:33:01 +0200 Subject: [PATCH] make the separator configurable --- planetlab/exp-tool/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/planetlab/exp-tool/Makefile b/planetlab/exp-tool/Makefile index 7c8276931..d13c405d2 100644 --- a/planetlab/exp-tool/Makefile +++ b/planetlab/exp-tool/Makefile @@ -1,14 +1,16 @@ include conf.mk + # proj1(x@y) = x proj1=$(word 1,$(subst @, ,$(1))) # proj2(x@y) = y proj2=$(word 2,$(subst @, ,$(1))) +SEP?=- # get(x-y@1) = x # get(x-y@2) = y -get=$(word $(call proj2,$(1)),$(subst -, ,$(call proj1,$(1)))) +get=$(word $(call proj2,$(1)),$(subst $(SEP), ,$(call proj1,$(1)))) # flip(1) = 2 # flip(2) = 1 @@ -108,9 +110,9 @@ del-bridge.%: cache/db.% $(SSH) $(HOST_$*) sudo sliver-ovs del-bridge $$(cat cache/bridge.$*);\ fi @rm -f cache/bridge.$* \ - cache/iface.$*-*@1 cache/iface.*-$*@2 \ - cache/link.$*-*@? cache/link.*-$*@? \ - L/$*-* L/*-$* + cache/iface.$*$(SEP)*@1 cache/iface.*$(SEP)$*@2 \ + cache/link.$*$(SEP)*@? cache/link.*$(SEP)$*@? \ + L/$*$(SEP)* L/*$(SEP)$* del-switchd.%: del-bridge.% @echo "Shutting down switchd on $(call display,$*)" @@ -138,7 +140,7 @@ shutdown: del-switches del-dbs #################### graph.dot: - ( echo "digraph $(SLICE) {"; ls L | sed 's/-/->/;s/$$/;/'; echo "}" ) > $@ + ( echo "digraph $(SLICE) {"; ls L | sed 's/$(SEP)/->/;s/$$/;/'; echo "}" ) > $@ graph.ps: graph.dot dot -Tps < $^ > $@ -- 2.43.0