turn off wsdl generation until it is fixed
[sfa.git] / Makefile
1 #
2 ## (Re)builds Python metafile (__init__.py) and documentation
3
4 # overwritten by the specfile
5 DESTDIR="/"
6
7 ##########
8 #all: keyconvert python wsdl
9 # turn off wsdl generation until it is fixed
10 all: keyconvert python
11
12 install: keyconvert-install python-install wsdl-install
13
14 clean: keyconvert-clean python-clean wsdl-clean
15
16 .PHONY: all install clean 
17
18 ##########
19 keyconvert:
20         $(MAKE) -C keyconvert
21
22 keyconvert-install:
23         $(MAKE) -C keyconvert install
24
25 keyconvert-clean:
26         $(MAKE) -C keyconvert clean
27
28 .PHONY: keyconvert keyconvert-install keyconvert-clean 
29
30 ##########
31 python: 
32
33 python-install:
34         python setup.py install --root=$(DESTDIR)
35
36 python-clean:
37         python setup.py clean
38         rm $(init)
39
40 .PHONY: python python-install python-clean
41 ##########
42 wsdl: 
43         $(MAKE) -C wsdl 
44
45 # propagate DESTDIR from the specfile
46 wsdl-install:
47         $(MAKE) -C wsdl install 
48
49 wsdl-clean:
50         $(MAKE) -C wsdl clean
51
52 .PHONY: wsdl wsdl-install wsdl-clean
53 ##########
54
55 # are the .java files used ?
56 tags:   
57         find . -type f | egrep -v '/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$' | xargs etags
58 .PHONY: tags
59
60
61 ########## sync
62 # 2 forms are supported
63 # (*) if your plc root context has direct ssh access:
64 # make sync PLC=private.one-lab.org
65 # (*) otherwise, entering through the root context
66 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
67
68 ifdef GUEST
69 ifdef PLCHOST
70 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
71 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
72 endif
73 endif
74 ifdef PLC
75 SSHURL:=root@$(PLC):/
76 SSHCOMMAND:=ssh root@$(PLC)
77 endif
78
79 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
80 RSYNC_EXCLUDES          := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
81 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
82 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
83
84 BINS =  ./config/sfa-config-tty ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py \
85         ./sfa/server/sfa-server.py \
86         ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
87         ./sfa/client/setRecord.py ./sfa/client/genidump.py
88
89 sync:
90 ifeq (,$(SSHURL))
91         @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
92         @echo "  e.g. make sync PLC=private.one-lab.org"
93         @echo "  or   make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
94         @exit 1
95 else
96         +$(RSYNC) ./sfa/ $(SSHURL)/usr/lib/python2.5/site-packages/sfa/
97         +$(RSYNC)  $(BINS) $(SSHURL)/usr/bin
98         $(SSHCOMMAND) exec service sfa restart
99 endif
100
101 .PHONY: sync
102 ##########