2 ## (Re)builds Python metafile (__init__.py) and documentation
4 # overwritten by the specfile
12 all: keyconvert python wsdl
14 install: keyconvert-install python-install wsdl-install xmlbuilder-install
16 clean: keyconvert-clean python-clean wsdl-clean
18 uninstall: python-uninstall
20 .PHONY: all install clean
27 $(MAKE) -C keyconvert install
30 $(MAKE) -C keyconvert clean
32 .PHONY: keyconvert keyconvert-install keyconvert-clean
38 cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd -
41 python setup.py install --root=$(DESTDIR) --home=$(PREFIX) | grep copying >> python_install.log
42 chmod 444 $(DESTDIR)/etc/sfa/default_config.xml
45 python setup.py uninstall
46 bash uninstall_python.sh
47 $(awk '{print $$4}' python_install.log)
53 .PHONY: python python-install python-clean xmlbuilder-install
58 # propagate DESTDIR from the specfile
60 $(MAKE) -C wsdl install
65 .PHONY: wsdl wsdl-install wsdl-clean
68 # are the .java files used ?
70 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
75 # 2 forms are supported
76 # (*) if your plc root context has direct ssh access:
77 # make sync PLC=private.one-lab.org
78 # (*) otherwise, entering through the root context
79 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
83 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
84 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
89 SSHCOMMAND:=ssh root@$(PLC)
92 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
93 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
94 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
95 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
97 BINS = ./config/sfa-config-tty ./config/gen-sfa-cm-config.py \
98 ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py ./sfa/server/sfa-server.py \
99 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
100 ./sfa/client/setRecord.py ./sfa/client/sfadump.py
104 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
105 @echo " e.g. make sync PLC=private.one-lab.org"
106 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
109 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
110 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
111 $(SSHCOMMAND) exec service sfa restart