Setting tag myplc-5.3-5
[myplc.git] / Makefile
index 309e17a..0b57cd1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,25 +1,23 @@
 ##########
 tags:
-       find . -type f | egrep -v '.svn/|~$$' | xargs etags
+       find . -type f | egrep -v '\.git/|~$$' | xargs etags
 
 .PHONY: tags
 
 ########## sync
 # 2 forms are supported
 # (*) if your plc root context has direct ssh access:
-# make sync PLC=boot.planet-lab.eu
-# (*) otherwise, entering through the root context
-# make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr
+# make sync PLC=private.one-lab.org
+# (*) otherwise, for test deployments, use on your testmaster
+# $ run export
+# and cut'n paste the export lines before you run make sync
 
-PLCHOST ?= testplc.onelab.eu
-
-ifdef GUEST
-SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
-SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
-endif
 ifdef PLC
 SSHURL:=root@$(PLC):/
 SSHCOMMAND:=ssh root@$(PLC)
+else
+SSHURL:=root@$(PLCHOSTLXC):/vservers/$(GUESTNAME)/
+SSHCOMMAND:=ssh root@$(PLCHOSTLXC) ssh $(GUESTHOSTNAME)
 endif
 
 LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' 
@@ -29,18 +27,19 @@ RSYNC                       := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
 
 sync:
 ifeq (,$(SSHURL))
-       @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
-       @echo "  e.g. make sync PLC=boot.planet-lab.eu"
-       @echo "  or   make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr"
+       @echo "sync: I need more info from the command line, e.g."
+       @echo "  make sync PLC=boot.planetlab.eu"
+       @echo "  make sync PLCHOSTVS=.. GUESTNAME=.."
+       @echo "  make sync PLCHOSTLXC=.. GUESTNAME=.. GUESTHOSTNAME=.."
        @exit 1
 else
        +$(RSYNC) plc.init $(SSHURL)/etc/init.d/plc
        +$(RSYNC) bin/ $(SSHURL)/usr/bin/
        +$(RSYNC) plc.d/ $(SSHURL)/etc/plc.d/
        +$(RSYNC) db-config.d/ $(SSHURL)/etc/planetlab/db-config.d/
-       +$(RSYNC) plc_config.py $(SSHURL)/usr/lib/python2.\*/site-packages/plc_config.py
+       +$(RSYNC) plc_config.py $(SSHURL)/usr/lib\*/python2.\*/site-packages/plc_config.py
        +$(RSYNC) default_config.xml $(SSHURL)/etc/planetlab/default_config.xml
-       @echo XXXXXXXX you might need to run ssh root@$(PLC) service plc start 
+       @echo XXXXXXXX you might need to run $(SSHCOMMAND) service plc start 
 endif
 
 #################### convenience, for debugging only