Changeset View
Changeset View
Standalone View
Standalone View
docs/Makefile
SPHINXOPTS ?= | SPHINXOPTS ?= | ||||
SPHINXBUILD = python3 -c 'import sphinx, sys; sys.exit(sphinx.main(sys.argv))' | SPHINXBUILD = python3 -c 'import sphinx, sys; sys.exit(sphinx.main(sys.argv))' | ||||
SOURCEDIR = . | SOURCEDIR = . | ||||
BUILDDIR = _build | BUILDDIR = _build | ||||
HTMLDIR = $(BUILDDIR)/html | HTMLDIR = $(BUILDDIR)/html | ||||
SWHPKGDIR = `python3 -c 'import swh; print(swh.__path__[0])'` | SWHPKGDIR = sources/swh/ | ||||
INSTALL_HOST = pergamon.internal.softwareheritage.org | INSTALL_HOST = pergamon.internal.softwareheritage.org | ||||
INSTALL_DIR = /srv/softwareheritage/docs/webroot/devel | INSTALL_DIR = /srv/softwareheritage/docs/webroot/devel | ||||
INSTALL_GROUP = swhdev | INSTALL_GROUP = swhdev | ||||
INSTALL_PERMS = g+rwX | INSTALL_PERMS = g+rwX | ||||
SPHINXAPIDOC = sphinx-apidoc | SPHINXAPIDOC = sphinx-apidoc | ||||
APIDOC_DIR = apidoc | APIDOC_DIR = apidoc | ||||
APIDOC_OPTS = --ext-viewcode | APIDOC_OPTS = --ext-viewcode | ||||
APIDOC_EXCLUDES = */tests */tests/* */*/tests/* */*/*/tests/* | APIDOC_EXCLUDES = */tests */tests/* */*/tests/* */*/*/tests/* | ||||
APIDOC_EXCLUDES += */migrations */migrations/* */*/migrations/* */*/*/migrations/* | APIDOC_EXCLUDES += */migrations */migrations/* */*/migrations/* */*/*/migrations/* | ||||
APIDOC_EXCLUDES += */wsgi.py */*/wsgi.py */*/*/wsgi.py */*/*/wsgi.py | APIDOC_EXCLUDES += */wsgi.py */*/wsgi.py */*/*/wsgi.py */*/*/wsgi.py | ||||
APIDOC_SWH_EXCLUDES = $(patsubst %,$(SWHPKGDIR)/%,$(APIDOC_EXCLUDES)) | APIDOC_SWH_EXCLUDES = $(patsubst %,$(SWHPKGDIR)/%,$(APIDOC_EXCLUDES)) | ||||
html: sphinx/html | html: sphinx/html | ||||
sphinx/html: links-stamp apidoc-stamp images-stamp rec-build-stamp | sphinx/html: links-stamp apidoc-stamp images-stamp rec-build-stamp | ||||
links-stamp: | links-stamp: | ||||
bin/ln-sphinx-subprojects | bin/ln-sphinx-subprojects | ||||
touch $@ | touch $@ | ||||
apidoc: apidoc-stamp | apidoc: apidoc-stamp | ||||
apidoc-stamp: images-stamp | apidoc-stamp: links-stamp images-stamp | ||||
$(SPHINXAPIDOC) $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES) | $(SPHINXAPIDOC) --implicit-namespaces $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES) | ||||
touch $@ | touch $@ | ||||
images-stamp: | images-stamp: | ||||
$(MAKE) -C images | $(MAKE) -C images | ||||
touch $@ | touch $@ | ||||
# Build documentation recursively in all packages, to make sure that auxiliary, | # Build documentation recursively in all packages, to make sure that auxiliary, | ||||
# non-sphinx managed documentation artifacts (e.g., schema diagrams) are also | # non-sphinx managed documentation artifacts (e.g., schema diagrams) are also | ||||
Show All 31 Lines |