chiark / gitweb /
Makefile: Hardlink example bundles into docs
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 14:58:00 +0000 (15:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 14:58:00 +0000 (15:58 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile

index ecd8cbb292b5bff6a656566752088ae220af9ae9..ff0646b2baaee075372b63ef1a9acab108fc808b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -234,13 +234,17 @@ stamp/cargo.deploy-build: $(call rsrcs,.)
 
 #---------- sphnix ----------
 
-doc-sphinx: docs/html/index.html
+doc-sphinx:    docs/html/index.html \
+               $(foreach f, $(EXAMPLE_BUNDLES), docs/html/$f.zip)
        @echo 'Documentation can now be found here:'
        @echo '  file://$(PWD)/$<'
 
 docs/html/index.html: docs/conf.py $(wildcard docs/*.md docs/*.rst docs/*.png)
        $(SPHINXBUILD) -M html docs docs $(SPHINXOPTS)
 
+docs/html/%.zip: examples/%.zip
+       rm -f $@ && ln $< $@
+
 #---------- wasm ----------
 
 $(addprefix $(WASM_PACKED)/,$(WASM_ASSETS) $(WASM_OUTPUTS)): stamp/wasm-bindgen