2 # $Id: Makefile 682 2007-07-19 09:00:25Z thierry $
6 # 2 forms are supported
7 # (*) if your plc root context has direct ssh access:
8 # make sync PLC=private.one-lab.org
9 # (*) otherwise, entering through the root context
10 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
14 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
15 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
20 SSHCOMMAND:=ssh root@$(PLC)
23 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
24 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
25 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
26 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
32 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
33 @echo " you can optionnally define DEPLOYMENT too, it defaults to 'regular'"
34 @echo " e.g. make sync PLC=boot.onelab.eu DEPLOYMENT=alpha"
35 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
38 $(SSHCOMMAND) mkdir -p /usr/share/bootmanager/$(DEPLOYMENT)
39 +$(RSYNC) build.sh source $(SSHURL)/usr/share/bootmanager/$(DEPLOYMENT)
40 $(SSHCOMMAND) service plc start bootmanager
45 find . -type f | egrep -v '/\.svn/|~$$' | xargs etags