5 BINARIES = plc-config plc-config-tty db-config dns-config \
6 clean-empty-dirs.py mtail.py \
7 plc-check-ssl-peering.py plc-map.py plc-kml.py plc-orphan-accounts.py \
8 support-scripts/renew_reminder.py support-scripts/gen_aliases.py
9 INIT_SCRIPTS = api bootcd bootmanager db dns functions gpg httpd mail network packages postgresql ssh ssl
11 INITS=$(addprefix plc.d/,$(INIT_SCRIPTS))
15 find . -type f | egrep -v '.svn/|~$$' | xargs etags
20 # 2 forms are supported
21 # (*) if your plc root context has direct ssh access:
22 # make sync PLC=private.one-lab.org
23 # (*) otherwise, entering through the root context
24 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
28 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
29 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
34 SSHCOMMAND:=ssh root@$(PLC)
37 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
38 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
39 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
40 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
44 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
45 @echo " e.g. make sync PLC=private.one-lab.org"
46 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
49 +$(RSYNC) plc.init $(SSHURL)/etc/init.d/plc
50 +$(RSYNC) $(BINARIES) $(SSHURL)/usr/bin
51 +$(RSYNC) $(INITS) $(SSHURL)/etc/plc.d
52 +$(RSYNC) plc_config.py $(SSHURL)/usr/lib/python2.5/site-packages/plc_config.py
53 +$(RSYNC) default_config.xml $(SSHURL)/etc/planetlab/default_config.xml
54 @echo XXXXXXXX you might need to run ssh root@$(PLC) service plc start
57 #################### convenience, for debugging only
58 # make +foo : prints the value of $(foo)
59 # make ++foo : idem but verbose, i.e. foo=$(foo)
60 ++%: varname=$(subst +,,$@)
62 @echo "$(varname)=$($(varname))"
63 +%: varname=$(subst +,,$@)