no more support for chroot-based packaging
[myplc.git] / Makefile
1
2 # $Id$
3 #
4
5 BINARIES = plc-config plc-config-tty db-config dns-config plc-map.py plc-kml.py clean-empty-dirs.py mtail.py \
6         support-scripts/renew_reminder.py support-scripts/gen_aliases.py
7 INIT_SCRIPTS = api bootcd bootmanager crond db dns functions gpg httpd mail network packages postgresql ssh ssl syslog
8
9 INITS=$(addprefix plc.d/,$(INIT_SCRIPTS))
10
11 ########## make sync PLCHOST=hostname
12 ifdef PLCHOST
13 ifdef GUEST
14 PLCSSH:=root@$(PLCHOST):/vservers/$(GUEST)
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 GUEST on the command line"
26         echo " e.g. make sync PLCHOST=private.one-lab.org GUEST=myplc01" ; exit 1
27 else
28         +$(RSYNC) plc.init $(PLCSSH)/etc/init.d/plc
29         +$(RSYNC) $(BINARIES) $(PLCSSH)/usr/bin
30         +$(RSYNC) $(INITS) $(PLCSSH)/etc/plc.d
31         +$(RSYNC) plc_config.py $(PLCSSH)/usr/lib/python2.4/site-packages/plc_config.py
32         +$(RSYNC) default_config.xml $(PLCSSH)/etc/planetlab/default_config.xml
33         @echo XXXXXXXX You might consider running the following command
34         @echo ssh $(PLCHOST) service plc start 
35 endif
36
37
38 tags:
39         find . -type f | egrep -v '.svn/|~$$' | xargs etags
40
41 .PHONY: tags