Files
jupyterhub/docs/Makefile
2025-02-18 21:04:02 +00:00

59 lines
1.9 KiB
Makefile

# Makefile for Sphinx documentation generated by sphinx-quickstart
# ----------------------------------------------------------------------------
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?= --color -W --keep-going
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
.PHONY: help Makefile metrics scopes
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.
#
# Several sphinx-build commands can be used through this, for example:
#
# - make clean
# - make linkcheck
# - make spelling
#
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
# Manually added targets - related to code generation
# ----------------------------------------------------------------------------
# For local development:
# - builds the html
# - NOTE: If the pre-requisites for the html target is updated, also update the
# Read The Docs section in docs/source/conf.py.
#
html: metrics
$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS)
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
metrics: source/reference/metrics.md
source/reference/metrics.md:
python3 generate-metrics.py
# Manually added targets - related to development
# ----------------------------------------------------------------------------
# For local development:
# - requires sphinx-autobuild, see
# https://sphinxcontrib-spelling.readthedocs.io/en/latest/
# - builds and rebuilds html on changes to source, but does not re-generate
# metrics files
# - starts a livereload enabled webserver and opens up a browser
devenv: html
sphinx-autobuild -b html --open-browser "$(SOURCEDIR)" "$(BUILDDIR)/html"