Tagging module nodeconfig - nodeconfig-4.3-2
[nodeconfig.git] / Makefile
1 ### $Id$
2 #
3 # how to push a working directoy to a running plc
4 #
5
6 tags:
7         find . -type f | grep -v '/\.svn/' | egrep -v '/(uudecode.gz|tags|TAGS)$$' | xargs etags
8
9 .PHONY: tags
10
11 ########## make sync PLCHOST=hostname VSERVER=vservername
12 ifdef PLCHOST
13 ifdef VSERVER
14 PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER)
15 endif
16 endif
17
18 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
19 RSYNC_EXCLUDES          := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
20 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
21 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
22
23 sync:
24 ifeq (,$(PLCSSH))
25         echo "sync: You must define PLCHOST and VSERVER on the command line"
26         echo " e.g. make sync PLCHOST=private.one-lab.org VSERVER=myplc01" ; exit 1
27 else
28         +$(RSYNC) PlanetLabConf boot PLCAPI $(PLCSSH)/var/www/html/
29         ssh root@$(PLCHOST) vserver $(VSERVER) exec apachectl graceful
30 endif
31