-
Notifications
You must be signed in to change notification settings - Fork 416
/
Makefile
48 lines (35 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = Uberspace7lab
SOURCEDIR = source
BUILDDIR = build
PYTHON_VERSION = $(shell cat runtime.txt)
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help setup setup-venv setup-pre-commit lint check-guides Makefile
setup: setup-venv setup-pre-commit
setup-venv:
python$(PYTHON_VERSION) -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install --upgrade wheel
.venv/bin/pip install -r requirements.txt
setup-pre-commit:
.venv/bin/pre-commit install --overwrite --install-hooks
lint:
.venv/bin/pre-commit run --all-files
check-guides:
.venv/bin/python check-guides.py --check --warn source/guide_*.rst
get-new-words: clean spelling
.venv/bin/python spelling_tools.py
add-new-words:
.venv/bin/python spelling_tools.py --merge
serve:
sphinx-autobuild -b html $(SOURCEDIR) $(BUILDDIR)/html
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)