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