c6994328467b6b4c0b97b730d1ed2aa01983b0b9
[sfa.git] / wsdl / Makefile
1 # attempt to update at build-time
2
3 WSDLS = sfa.wsdl registry.wsdl slice-manager.wsdl aggregate.wsdl 
4
5 all: $(WSDLS)
6
7 # temporary: turn off wsdl generation as it is failing
8 TEMPORARY_OFF = yes
9
10 ifdef TEMPORARY_OFF
11 registry.wsdl slice-manager.wsdl aggregate.wsdl sfa.wsdl:
12         touch $@
13 else
14 registry.wsdl:
15         PYTHONPATH=../ ./sfa2wsdl.py --registry > $@
16
17 slice-manager.wsdl:
18         PYTHONPATH=../ ./sfa2wsdl.py --slice-manager > $@
19
20 aggregate.wsdl:
21         PYTHONPATH=../ ./sfa2wsdl.py --aggregate > $@
22
23 sfa.wsdl:
24         PYTHONPATH=../ ./sfa2wsdl.py --registry --slice-manager --aggregate > $@
25 endif
26
27 #################### install
28 # DESTDIR set but the calling Makefile in ../
29 INSTALL_PATH=/var/www/html/wsdl
30 INSTALLED=$(foreach wsdl,$(WSDLS),$(DESTDIR)$(INSTALL_PATH)/$(wsdl))
31
32 install: $(INSTALLED)
33
34 $(DESTDIR)$(INSTALL_PATH):
35         install -d -m 0755 $(DESTDIR)$(INSTALL_PATH)
36
37 $(DESTDIR)$(INSTALL_PATH)/%: wsdl=$(notdir $@)
38 $(DESTDIR)$(INSTALL_PATH)/%: $(DESTDIR)$(INSTALL_PATH) %
39         install -c -m 0755 $(wsdl) $@
40
41 #################### clean
42 clean:
43         rm -f *wsdl
44
45 install-clean:
46         rm -f $(INSTALLED)
47
48 .PHONY: all clean install install-clean
49