2 ## (Re)builds Python metafile (__init__.py) and documentation
4 # overwritten by the specfile
10 install: python-install wsdl-install xmlbuilder-install
12 clean: python-clean wsdl-clean
14 uninstall: python-uninstall
16 .PHONY: all install clean
22 cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd -
25 python setup.py install --root=$(DESTDIR)
26 chmod 444 $(DESTDIR)/etc/sfa/default_config.xml
32 .PHONY: python python-install python-clean xmlbuilder-install
37 # propagate DESTDIR from the specfile
39 $(MAKE) -C wsdl install
44 .PHONY: wsdl wsdl-install wsdl-clean
47 # are the .java files used ?
49 find . -type f | egrep -v '/\.git/|/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
54 # 2 forms are supported
55 # (*) if your plc root context has direct ssh access:
56 # make sync PLC=private.one-lab.org
57 # (*) otherwise, entering through the root context
58 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
60 PLCHOST ?= testplc.onelab.eu
64 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
65 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
70 SSHCOMMAND:=ssh root@$(PLC)
73 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
74 RSYNC_EXCLUDES := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
75 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
76 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) --no-owner $(RSYNC_EXCLUDES)
78 BINS = ./config/sfa-config-tty ./config/gen-sfa-cm-config.py \
79 ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py ./sfa/server/sfa-server.py \
80 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
81 ./sfa/client/setRecord.py ./sfa/client/sfadump.py
85 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
86 @echo " e.g. make sync PLC=private.one-lab.org"
87 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
90 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
91 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
92 $(SSHCOMMAND) exec service sfa restart