2 ## (Re)builds Python metafile (__init__.py) and documentation
4 # overwritten by the specfile
8 all: keyconvert python wsdl
10 install: keyconvert-install python-install wsdl-install
12 clean: keyconvert-clean python-clean wsdl-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
43 # propagate DESTDIR from the specfile
45 $(MAKE) -C wsdl install
50 .PHONY: wsdl wsdl-install wsdl-clean
53 # are the .java files used ?
55 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
60 # 2 forms are supported
61 # (*) if your plc root context has direct ssh access:
62 # make sync PLC=private.one-lab.org
63 # (*) otherwise, entering through the root context
64 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
68 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
69 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
74 SSHCOMMAND:=ssh root@$(PLC)
77 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
78 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
79 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
80 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
82 BINS = ./config/sfa-config-tty ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py \
83 ./sfa/server/sfa-server.py \
84 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
85 ./sfa/client/setRecord.py ./sfa/client/genidump.py
89 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
90 @echo " e.g. make sync PLC=private.one-lab.org"
91 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
94 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
95 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
96 $(SSHCOMMAND) exec service sfa restart