2 ## (Re)builds Python metafile (__init__.py) and documentation
4 # overwritten by the specfile
8 #all: keyconvert python wsdl
9 # turn off wsdl generation until it is fixed
10 all: keyconvert python
12 install: keyconvert-install python-install wsdl-install
14 clean: keyconvert-clean python-clean wsdl-clean
16 .PHONY: all install clean
23 $(MAKE) -C keyconvert install
26 $(MAKE) -C keyconvert clean
28 .PHONY: keyconvert keyconvert-install keyconvert-clean
34 python setup.py install --root=$(DESTDIR)
40 .PHONY: python python-install python-clean
45 # propagate DESTDIR from the specfile
47 $(MAKE) -C wsdl install
52 .PHONY: wsdl wsdl-install wsdl-clean
55 # are the .java files used ?
57 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
62 # 2 forms are supported
63 # (*) if your plc root context has direct ssh access:
64 # make sync PLC=private.one-lab.org
65 # (*) otherwise, entering through the root context
66 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
70 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
71 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
76 SSHCOMMAND:=ssh root@$(PLC)
79 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
80 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
81 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
82 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
84 BINS = ./config/sfa-config-tty ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py \
85 ./sfa/server/sfa-server.py \
86 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
87 ./sfa/client/setRecord.py ./sfa/client/genidump.py
91 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
92 @echo " e.g. make sync PLC=private.one-lab.org"
93 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
96 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
97 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
98 $(SSHCOMMAND) exec service sfa restart