initial import from onelab svn codebase
[plewww.git] / Makefile
1 # refresh tags
2 tags:
3         find . '(' -name '*.php' -o -name '*.js' -o -name '*.module' -o -name '*.css' -o -name Makefile ')' | xargs etags
4
5 .PHONY: tags
6
7 ########## make sync PLCHOST=hostname
8 ifdef PLCHOST
9 PLCSSH:=root@$(PLCHOST)
10 endif
11
12 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
13 RSYNC_EXCLUDES          := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
14 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
15 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
16
17 sync:
18 ifeq (,$(PLCSSH))
19         echo "sync: You must define target host as PLCHOST on the command line"
20         echo " e.g. make sync PLCHOST=private.one-lab.org" ; exit 1
21 else
22         +$(RSYNC) planetlab modules $(PLCSSH):/plc/root/var/www/html/
23 endif
24