Page MenuHomeSoftware Heritage

Makefile.sphinx
No OneTemporary

Makefile.sphinx

# Makefile to be included by other modules, from the TOPLEVEL/docs/ dir, to
# automatically build sphinx documentation.
APIDOC_DIR = apidoc
APIDOC_OPTS = --ext-viewcode --separate
SPHINXBUILD = sphinx-build
SPHINXAPIDOC = sphinx-apidoc
SPHINX_OPTS =
SPHINX_BUILDDIR = _build
SPHINX_SRCDIR = .
# relative to docs/ dir. Hence "." exclude the docs/ dir itself
APIDOC_EXCLUDES = . ../setup.py
APIDOC_EXCLUDES += ../swh/*/tests ../swh/*/tests/* ../swh/*/*/tests/* ../swh/*/*/*/tests/*
APIDOC_EXCLUDES += ../swh/*/migrations ../swh/*/migrations/* ../swh/*/*/migrations/* ../swh/*/*/*/migrations/*
APIDOC_EXCLUDES += ../bin ../dist ../utils ../node_modules
html: sphinx/html
help: sphinx/help
# allow to skip apidoc generation, for modules where the overall documentation
# structure, table of contents, etc., is manually curated
ifeq ($(SKIP_APIDOC),yes)
apidoc_dep =
else
apidoc_dep = apidoc-stamp
endif
sphinx/clean:
$(SPHINXBUILD) -M clean $(SPHINX_SRCDIR) $(SPHINX_BUILDDIR) $(SPHINXOPTS)
sphinx/%: $(apidoc_dep)
$(SPHINXBUILD) -b $* $(SPHINX_SRCDIR) $(SPHINX_BUILDDIR)/$* $(SPHINXOPTS)
apidoc: $(apidoc_dep)
apidoc-stamp:
$(SPHINXAPIDOC) $(APIDOC_OPTS) -o $(APIDOC_DIR) .. $(APIDOC_EXCLUDES)
# to silent Sphinx warnings about apidoc documents not included in any toctree
find $(shell pwd)/apidoc -name "*.rst" | xargs sed -i '1i:orphan:\n'
touch $@
assets:
.PHONY: clean clean-apidoc
clean: sphinx/clean clean-apidoc
clean-apidoc:
rm -rf $(APIDOC_DIR)
rm -f *-stamp
# Local Variables:
# mode: makefile
# End:

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 4, 2:29 PM (6 d, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3255848

Event Timeline