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 xmlbuilder-install
12 clean: keyconvert-clean python-clean wsdl-clean
14 uninstall: python-uninstall
16 .PHONY: all install clean
23 $(MAKE) -C keyconvert install
26 $(MAKE) -C keyconvert clean
28 .PHONY: keyconvert keyconvert-install keyconvert-clean
34 cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd -
37 python setup.py install --root=$(DESTDIR)
38 chmod 444 $(DESTDIR)/etc/sfa/default_config.xml
44 .PHONY: python python-install python-clean xmlbuilder-install
49 # propagate DESTDIR from the specfile
51 $(MAKE) -C wsdl install
56 .PHONY: wsdl wsdl-install wsdl-clean
59 # are the .java files used ?
61 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
66 # 2 forms are supported
67 # (*) if your plc root context has direct ssh access:
68 # make sync PLC=private.one-lab.org
69 # (*) otherwise, entering through the root context
70 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
74 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
75 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
80 SSHCOMMAND:=ssh root@$(PLC)
83 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
84 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
85 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
86 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
88 BINS = ./config/sfa-config-tty ./config/gen-sfa-cm-config.py \
89 ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py ./sfa/server/sfa-server.py \
90 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
91 ./sfa/client/setRecord.py ./sfa/client/sfadump.py
95 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
96 @echo " e.g. make sync PLC=private.one-lab.org"
97 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
100 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
101 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
102 $(SSHCOMMAND) exec service sfa restart