diff --git a/.gitignore b/.gitignore index 4f8e2fb6..089d925d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,5 @@ rust/target **/.coverage.* **/coverage **/dist/* -docs/_static/test-js.html +docs/_static/test-*.html javascript/src/lib/fallbacks diff --git a/docs/Makefile b/docs/Makefile index cb2af22a..4b4984e7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -27,22 +27,52 @@ help: .PHONY: help Makefile clean: - rm -r _build _static/index.html _static/dist || echo + rm -r _build _static/test-*.html _static/dist || echo dependencies: $(PIP) install -r requirements.txt -r ../c/requirements.txt -r ../python/requirements.txt --upgrade $(USER_FLAG) $(PROXY_ARG) npm install -g jsdoc -_static/index.html: Makefile +_static/test-c.html: + cd ../c && $(MAKE) webpack $(MFLAGS) + mkdir -p _static/dist + cp ../c/dist/bundle-c.js _static/dist/bundle-c.js + cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-c.js > _static/test-c.html + +_static/test-cp.html: + cd ../cplusplus && $(MAKE) webpack $(MFLAGS) + mkdir -p _static/dist + cp ../cplusplus/dist/bundle-cp.js _static/dist/bundle-cp.js + cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-cp.js > _static/test-cp.html + +_static/test-cs.html: + cd ../csharp && $(MAKE) webpack $(MFLAGS) + mkdir -p _static/dist + cp ../csharp/dist/bundle-cs.js _static/dist/bundle-cs.js + cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-cs.js > _static/test-cs.html + +_static/test-js.html: cd ../javascript && $(MAKE) webpack $(MFLAGS) mkdir -p _static/dist cp ../javascript/dist/bundle-js.js _static/dist/bundle-js.js cp ../javascript/index.html _static/test-js.html -html: Makefile _static/index.html +_static/test-py.html: + cd ../python && $(MAKE) webpack $(MFLAGS) + mkdir -p _static/dist + cp ../javascript/dist/bundle-py.js _static/dist/bundle-py.js + cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-py.js > _static/test-py.html + +_static/test-rs.html: + cd ../rust && $(MAKE) webpack $(MFLAGS) + mkdir -p _static/dist + cp ../rust/dist/bundle-rs.js _static/dist/bundle-rs.js + cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-rs.js > _static/test-rs.html + +html: _static/test-js.html $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile +%: $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)