mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
This makes it so that `make -C doc` works to build all of the docs in a single command. there are still a few problems with this: 1. the build does not fail if the correct fonts are not found 2. the images are only generated via the makefile, so trying to build the docs by other methods won't work
22 lines
688 B
Makefile
22 lines
688 B
Makefile
# Minimal makefile for Sphinx documentation
|
|
#
|
|
|
|
# You can set these variables from the command line.
|
|
SPHINXOPTS = -W
|
|
SPHINXBUILD = sphinx-build
|
|
SPHINXPROJ = Pybricks
|
|
SOURCEDIR = source
|
|
BUILDDIR = build
|
|
|
|
# Put it first so that "make" without argument is like "make help".
|
|
help:
|
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
|
|
.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).
|
|
%: Makefile
|
|
@$(MAKE) -C source/_images `[ "$@" = "clean" ] && echo clean || echo all`
|
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|