2017-11-11 14:40:20 +04:00
|
|
|
# You can set these variables from the command line.
|
|
|
|
SPHINXOPTS = -aE -n
|
|
|
|
SPHINXBUILD = sphinx-build
|
|
|
|
SPHINXPROJ = Tezos
|
|
|
|
SOURCEDIR = .
|
|
|
|
BUILDDIR = _build
|
|
|
|
|
2018-03-07 13:32:53 +04:00
|
|
|
DOCGENDIR = doc_gen
|
|
|
|
DOCERRORDIR = $(DOCGENDIR)/errors
|
2018-03-14 19:20:24 +04:00
|
|
|
DOCRPCDIR = $(DOCGENDIR)/rpcs
|
2018-03-07 13:32:53 +04:00
|
|
|
|
2017-11-11 14:40:20 +04:00
|
|
|
all: html linkcheck
|
|
|
|
|
|
|
|
linkcheck:
|
|
|
|
$(SPHINXBUILD) -b linkcheck "$(SOURCEDIR)" "$(BUILDDIR)"
|
|
|
|
|
2018-03-14 19:20:24 +04:00
|
|
|
introduction/readme.rst: ../README.rst
|
|
|
|
sed 's/TEZOS/How to build and run/' $< > $@
|
|
|
|
|
2018-03-07 13:32:53 +04:00
|
|
|
api/errors.rst: $(DOCERRORDIR)/error_doc.ml
|
2018-07-24 17:17:26 +04:00
|
|
|
@cd .. && dune build docs/$(DOCERRORDIR)/error_doc.exe
|
2018-03-07 13:32:53 +04:00
|
|
|
../_build/default/docs/$(DOCERRORDIR)/error_doc.exe > api/errors.rst
|
|
|
|
|
2018-05-01 00:40:47 +04:00
|
|
|
$(DOCGENDIR)/rpc_doc.exe:
|
2018-07-24 17:17:26 +04:00
|
|
|
@cd .. && dune build docs/$(DOCGENDIR)/rpc_doc.exe
|
2018-05-01 00:40:47 +04:00
|
|
|
|
|
|
|
api/rpc.rst: $(DOCGENDIR)/rpc_doc.exe api/rpc_usage.rst.inc
|
2018-07-23 17:40:55 +04:00
|
|
|
@dune exec $(DOCGENDIR)/rpc_doc.exe < api/rpc_usage.rst.inc > api/rpc.rst
|
2018-05-01 00:40:47 +04:00
|
|
|
|
|
|
|
$(DOCGENDIR)/p2p_doc.exe:
|
2018-07-24 17:17:26 +04:00
|
|
|
@cd .. && dune build docs/$(DOCGENDIR)/p2p_doc.exe
|
2018-05-01 00:40:47 +04:00
|
|
|
|
|
|
|
api/p2p.rst: $(DOCGENDIR)/p2p_doc.exe api/p2p_usage.rst.inc
|
2018-07-23 17:40:55 +04:00
|
|
|
@dune exec $(DOCGENDIR)/p2p_doc.exe < api/p2p_usage.rst.inc > api/p2p.rst
|
2018-03-07 13:44:24 +04:00
|
|
|
|
2017-11-11 14:40:20 +04:00
|
|
|
.PHONY: help Makefile
|
|
|
|
|
|
|
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
|
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
2018-05-01 00:40:47 +04:00
|
|
|
html: Makefile api/errors.rst api/rpc.rst api/p2p.rst
|
2017-11-11 14:40:20 +04:00
|
|
|
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@-rm -Rf "$(BUILDDIR)"
|
2018-03-14 19:20:24 +04:00
|
|
|
@-rm -Rf introduction/readme.rst api/errors.rst api/rpc.rst
|