add unused driver method
[sfa.git] / wsdl / Makefile
1 # attempt to update at build-time
2
3 INTERFACES=sfa registry slice-manager aggregate
4
5 WSDLS = $(foreach interface,$(INTERFACES),$(interface).wsdl)
6 HTMLS = $(foreach interface,$(INTERFACES),$(interface).html)
7
8 all: $(WSDLS) $(HTMLS)
9
10 # temporary: turn off wsdl generation as it is failing
11 #TEMPORARY_OFF = yes
12
13 ifdef TEMPORARY_OFF
14 registry.wsdl slice-manager.wsdl aggregate.wsdl sfa.wsdl:
15         touch $@
16 else
17 registry.wsdl: sfa2wsdl.py
18         PYTHONPATH=../ ./sfa2wsdl.py --registry > $@
19
20 slice-manager.wsdl: sfa2wsdl.py
21         PYTHONPATH=../ ./sfa2wsdl.py --slice-manager > $@
22
23 aggregate.wsdl: sfa2wsdl.py
24         PYTHONPATH=../ ./sfa2wsdl.py --aggregate > $@
25
26 sfa.wsdl: sfa2wsdl.py
27         PYTHONPATH=../ ./sfa2wsdl.py --registry --slice-manager --aggregate > $@
28 endif
29
30 #################### install
31 # DESTDIR set but the calling Makefile in ../
32 INSTALL_PATH=/var/www/html/wsdl
33 INSTALLED=$(foreach wsdl,$(WSDLS),$(DESTDIR)$(INSTALL_PATH)/$(wsdl))
34
35 install: $(INSTALLED)
36
37 $(DESTDIR)$(INSTALL_PATH):
38         install -d -m 0755 $(DESTDIR)$(INSTALL_PATH)
39
40 $(DESTDIR)$(INSTALL_PATH)/%: wsdl=$(notdir $@)
41 $(DESTDIR)$(INSTALL_PATH)/%: $(DESTDIR)$(INSTALL_PATH) %
42         install -c -m 0755 $(wsdl) $@
43
44 #################### clean
45 clean::
46         rm -f $(WSDLS)
47
48 install-clean:
49         rm -f $(INSTALLED)
50
51 .PHONY: all clean install install-clean
52
53 #################### generate html document
54 %.html: %.wsdl wsdl2html.xsl
55         xsltproc $(XSLTFLAGS) wsdl2html.xsl $*.wsdl > $@ || rm $@
56
57 clean::
58         rm -f $(HTMLS)
59
60
61 backup:
62         $(foreach wsdl,$(WSDLS), cp $(wsdl) $(wsdl).bak;)
63         $(foreach html,$(HTMLS), cp $(html) $(html).bak;)
64
65 diff:
66         $(foreach wsdl,$(WSDLS), diff $(wsdl) $(wsdl).bak;)
67         $(foreach html,$(HTMLS), diff $(html) $(html).bak;)