2 ## (Re)builds Python metafile (__init__.py) and documentation
4 # overwritten by the specfile
10 install: keyconvert-install python-install
12 clean: keyconvert-clean python-clean
14 .PHONY: all install clean
21 $(MAKE) -C keyconvert install
24 $(MAKE) -C keyconvert clean
26 .PHONY: keyconvert keyconvert-install keyconvert-clean
32 python setup.py install --root=$(DESTDIR)
38 .PHONY: python python-install python-clean
41 # are the .java files used ?
43 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$' | xargs etags
48 subdirs = client methods plc server trust util
49 init := geni/__init__.py $(foreach subdir, $(subdirs), geni/$(subdir)/__init__.py)
61 # 2 forms are supported
62 # (*) if your plc root context has direct ssh access:
63 # make sync PLC=private.one-lab.org
64 # (*) otherwise, entering through the root context
65 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
69 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
70 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
75 SSHCOMMAND:=ssh root@$(PLC)
78 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
79 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
80 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
81 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
85 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
86 @echo " e.g. make sync PLC=private.one-lab.org"
87 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
90 +$(RSYNC) ./geni/ $(SSHURL)/usr/lib/python2.5/site-packages/geni/
91 +$(RSYNC) ./config/sfa-config-tty $(SSHURL)/usr/bin
92 $(SSHCOMMAND) exec service geni restart