A few goodies from onelab's bootmanager
[bootmanager.git] / Makefile
1
2 # $Id: Makefile 682 2007-07-19 09:00:25Z thierry $
3 #
4
5 ########## make sync PLCHOST=hostname
6 ifdef PLCHOST
7 PLCSSH:=root@$(PLCHOST)
8 endif
9
10 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
11 RSYNC_EXCLUDES          := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
12 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
13 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
14
15 sync:
16 ifeq (,$(PLCSSH))
17         echo "sync: You must define target host as PLCHOST on the command line"
18         echo " e.g. make sync PLCHOST=private.one-lab.org" ; exit 1
19 else
20         +$(RSYNC) source $(PLCSSH):/plc/root/usr/share/bootmanager/
21         ssh $(PLCSSH) chroot /plc/root service plc start bootmanager
22 endif
23
24 ##########
25 tags:
26         find . '(' -name '*.py' -o -name '*.spec' ')' | xargs etags