X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=wsdl%2FMakefile;h=78dc70d3a595d7808cf2951ebbc102b2688850b6;hb=16c8c088c4af3a872f7950ddc4a7bd3b05ed462b;hp=21d17d3bf2ccf5f7507f6a68ae0d4d6643884638;hpb=2d823c7ca7e9544b01ffa4abc83426b40842502a;p=sfa.git diff --git a/wsdl/Makefile b/wsdl/Makefile index 21d17d3b..78dc70d3 100644 --- a/wsdl/Makefile +++ b/wsdl/Makefile @@ -1,28 +1,33 @@ # attempt to update at build-time -ALL := sfa.wsdl registry.wsdl slice-manager.wsdl aggregate.wsdl +INTERFACES=sfa registry aggregate -all: $(ALL) +WSDLS = $(foreach interface,$(INTERFACES),$(interface).wsdl) +HTMLS = $(foreach interface,$(INTERFACES),$(interface).html) -registry.wsdl: - PYTHONPATH=../ ./gw2wsdl.py --registry > $@ +all: $(WSDLS) $(HTMLS) -slice-manager.wsdl: - PYTHONPATH=../ ./gw2wsdl.py --slice-manager > $@ +# temporary: turn off wsdl generation as it is failing +#TEMPORARY_OFF = yes -aggregate.wsdl: - PYTHONPATH=../ ./gw2wsdl.py --aggregate > $@ +ifdef TEMPORARY_OFF +registry.wsdl aggregate.wsdl sfa.wsdl: + touch $@ +else +registry.wsdl: sfa2wsdl.py + PYTHONPATH=../ ./sfa2wsdl.py --registry > $@ -sfa.wsdl: - PYTHONPATH=../ ./gw2wsdl.py --registry --slice-manager --aggregate > $@ +aggregate.wsdl: sfa2wsdl.py + PYTHONPATH=../ ./sfa2wsdl.py --aggregate > $@ + +sfa.wsdl: sfa2wsdl.py + PYTHONPATH=../ ./sfa2wsdl.py --registry --aggregate > $@ +endif #################### install # DESTDIR set but the calling Makefile in ../ INSTALL_PATH=/var/www/html/wsdl -INSTALLED=$(foreach wsdl,$(ALL),$(DESTDIR)$(INSTALL_PATH)/$(wsdl)) - -foo: - @echo INSTALLED=$(INSTALLED) +INSTALLED=$(foreach wsdl,$(WSDLS),$(DESTDIR)$(INSTALL_PATH)/$(wsdl)) install: $(INSTALLED) @@ -34,11 +39,26 @@ $(DESTDIR)$(INSTALL_PATH)/%: $(DESTDIR)$(INSTALL_PATH) % install -c -m 0755 $(wsdl) $@ #################### clean -clean: - rm -f *wsdl +clean:: + rm -f $(WSDLS) install-clean: rm -f $(INSTALLED) .PHONY: all clean install install-clean +#################### generate html document +%.html: %.wsdl wsdl2html.xsl + xsltproc $(XSLTFLAGS) wsdl2html.xsl $*.wsdl > $@ || rm $@ + +clean:: + rm -f $(HTMLS) + + +backup: + $(foreach wsdl,$(WSDLS), cp $(wsdl) $(wsdl).bak;) + $(foreach html,$(HTMLS), cp $(html) $(html).bak;) + +diff: + $(foreach wsdl,$(WSDLS), diff $(wsdl) $(wsdl).bak;) + $(foreach html,$(HTMLS), diff $(html) $(html).bak;)