clean_all_sites performs deep cleaning - useful when used in conjunction with the...
[tests.git] / system / Makefile
index 10f2063..06f2817 100644 (file)
@@ -1,16 +1,26 @@
 tags:
        find . '(' -name '*.py' -o -name 'qemu-*' ')' | grep -v '.svn/' | xargs etags
 
+.PHONY: tags
 
-LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' --exclude 'arg*' 
+####################
+
+########## make sync PLCHOST=hostname VSERVER=vservername
+ifdef PLCHOST
+ifdef BUILDNAME
+PLCSSH:=root@$(PLCHOST):$(BUILDNAME)
+endif
+endif
+
+LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' --exclude 'arg*'
 RSYNC_EXCLUDES         := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
 RSYNC_COND_DRY_RUN     := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
 RSYNC                  := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
 
 sync:
-ifeq (,$(RSYNC_URL))
-       echo "sync: You must define target host as RSYNC_URL on the command line"
-       echo " e.g. make sync RSYNC_URL=root@testbox1:workdir" ; exit 1
+ifeq (,$(PLCSSH))
+       echo "sync: You must define PLCHOST and BUILDNAME on the command line"
+       echo " e.g. make sync PLCHOST=private.one-lab.org BUILDNAME=" ; exit 1
 else
-       +$(RSYNC) ./ $(RSYNC_URL)/
+       +$(RSYNC) ./ $(PLCSSH)
 endif