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])'` | |||||
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 | ||||
html: fix-indices-stamp sphinx/html | SPHINXAPIDOC = sphinx-apidoc | ||||
APIDOC_DIR = apidoc | |||||
APIDOC_OPTS = --ext-viewcode | |||||
APIDOC_EXCLUDES = */tests */tests/* */*/tests/* */*/*/tests/* | |||||
APIDOC_EXCLUDES += */migrations */migrations/* */*/migrations/* */*/*/migrations/* | |||||
APIDOC_SWH_EXCLUDES = $(patsubst %,$(SWHPKGDIR)/%,$(APIDOC_EXCLUDES)) | |||||
fix-indices-stamp: sphinx/html | apidoc_dep = apidoc-stamp | ||||
bin/copy-and-fix-subprojects-indices | |||||
touch $@ | 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_dep) | |||||
apidoc-stamp: | apidoc-stamp: | ||||
$(MAKE) -C ../../ docs-apidoc | $(SPHINXAPIDOC) $(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 | ||||
# built. | # built. | ||||
rec-build-stamp: $(wildcard ../../swh-*/docs/*.rst) | rec-build-stamp: $(wildcard ../../swh-*/docs/*.rst) | ||||
$(MAKE) -C ../../ docs | $(MAKE) -C ../../ docs-assets | ||||
touch $@ | touch $@ | ||||
clean: sphinx/clean | clean: sphinx/clean | ||||
bin/ln-sphinx-subprojects --remove | bin/ln-sphinx-subprojects --remove | ||||
$(MAKE) -C images clean | $(MAKE) -C images clean | ||||
rm -f *-stamp | rm -f *-stamp | ||||
rm -f $(APIDOC_DIR)/* | |||||
distclean: clean | distclean: clean | ||||
make -C ../../ docs-clean | make -C ../../ docs-clean | ||||
help: sphinx/help | help: sphinx/help | ||||
sphinx/clean: | sphinx/clean: | ||||
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) | @$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) | ||||
Show All 13 Lines |