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 .PHONY: all install clean
21 $(MAKE) -C keyconvert install
24 $(MAKE) -C keyconvert clean
26 .PHONY: keyconvert keyconvert-install keyconvert-clean
32 cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd -
35 python setup.py install --root=$(DESTDIR)
36 chmod 444 $(DESTDIR)/etc/sfa/default_config.xml
42 .PHONY: python python-install python-clean xmlbuilder-install
47 # propagate DESTDIR from the specfile
49 $(MAKE) -C wsdl install
54 .PHONY: wsdl wsdl-install wsdl-clean
57 # are the .java files used ?
59 find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
64 # 2 forms are supported
65 # (*) if your plc root context has direct ssh access:
66 # make sync PLC=private.one-lab.org
67 # (*) otherwise, entering through the root context
68 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
72 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
73 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
78 SSHCOMMAND:=ssh root@$(PLC)
81 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
82 RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
83 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
84 RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
86 BINS = ./config/sfa-config-tty ./config/gen-sfa-cm-config.py \
87 ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py ./sfa/server/sfa-server.py \
88 ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
89 ./sfa/client/setRecord.py ./sfa/client/sfadump.py
93 @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
94 @echo " e.g. make sync PLC=private.one-lab.org"
95 @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
98 +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
99 +$(RSYNC) $(BINS) $(SSHURL)/usr/bin
100 $(SSHCOMMAND) exec service sfa restart