-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefiledck
44 lines (30 loc) · 1.03 KB
/
Makefiledck
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
# Convenience makefile to set up the environment and build the documentation
python = python3.6
HOSTUSER := $(USER_ID)
HOSTGROUP := $(GROUP_ID)
all: pip docs
docs: out/html/index.html
out/html/index.html: README.rst docs/_static/css/* docs/_templates/* sphinx-build docs_sources preprocess_sources
@sphinx-build -W docs docs/out/html
# @echo chown -R $(HOSTUSER):$(HOSTGROUP) docs/out
@chown -R 1000:1000 out
@touch $@
@echo "Documentation was generated at '$@'."
docs_sources: docs/*.rst docs/project_specific/*.rst
preprocess_sources: docs/project_specific/*.rst.jinja2 #assets/*
python code/bin/generate-docs
# NOTE: This requires you to have plantuml installed, so it's not hooked into
# any of the standard targets. Run it on demand.
plantuml: docs/diagrams/*.plantuml
plantuml -tsvg $^
sphinx-build: pip
@echo
pip: python
pip install -r requirements.txt
python:
@echo
clean: clean_generated
@rm -rf .Python p-env out
clean_generated:
@find -type f -iname '*_generated.rst' -delete
.PHONY: all docs clean preprocess_sources