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)
33 chmod 444 $(DESTDIR)/etc/sfa/default_config.xml
39 .PHONY: python python-install python-clean
44 # propagate DESTDIR from the specfile
46 $(MAKE) -C wsdl install
51 .PHONY: wsdl wsdl-install wsdl-clean
54 # are the .java files used ?
56 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
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)
83 BINS = ./config/sfa-config-tty ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py \
84 ./sfa/server/sfa-server.py \
85 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
86 ./sfa/client/setRecord.py ./sfa/client/sfadump.py
90 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
91 @echo " e.g. make sync PLC=private.one-lab.org"
92 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
95 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
96 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
97 $(SSHCOMMAND) exec service sfa restart