-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
32 lines (24 loc) · 943 Bytes
/
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
.PHONY: install docs
venv: venv/bin/activate
IN_VENV=. ./venv/bin/activate
venv/bin/activate:
test -d venv || virtualenv venv --python=python3
${IN_VENV} && pip install pip --upgrade
${IN_VENV} && pip install numpy # needs to get done before other things
${IN_VENV} && pip install -r requirements.txt
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
DOCSRC = docs
docs: venv
${IN_VENV} && pip install sphinx sphinx_rtd_theme sphinx-argparse
${IN_VENV} && cd $(DOCSRC) && $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(DOCSRC)/$(BUILDDIR)/html."
touch $(DOCSRC)/$(BUILDDIR)/html/.nojekyll