d26d630fe943b384f3beba67c1f2950f6aca9534
[tests.git] / plcapi / Makefile
1 ifdef PLCHOST
2 ifdef VSERVER
3 PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER)
4 endif
5 endif
6
7 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
8 RSYNC_EXCLUDES          := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
9 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
10 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
11
12 sync:
13 ifeq (,$(PLCSSH))
14         echo "sync: You must define PLCHOST and VSERVER on the command line"
15         echo " e.g. make sync PLCHOST=private.one-lab.org VSERVER=myplc01" ; exit 1
16 else
17         +$(RSYNC) Test.py $(PLCSSH)/usr/share/plc_api/
18 endif