forked from usnistgov/SOEN-PDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (42 loc) · 1.3 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
49
50
51
52
53
54
SHELL := /bin/bash
venv: venv/bin/activate
venv/bin/activate:
test -d venv || virtualenv -p python3 --prompt "(NIST-SOEN-venv)" --distribute venv
touch venv/bin/activate
clean:
rm -rf docs/_build
purge: clean
rm -rf venv
# Testing
testbuild: venv/build_info/testreqs
venv/build_info/testreqs: venv requirements-test.txt
source venv/bin/activate && pip install -r requirements-test.txt
@mkdir -p venv/build_info/testreqs
@touch venv/build_info/testreqs
test: testbuild
source venv/bin/activate && pytest tech/OLMAC/tests
# Documentation
SPHINXOPTS = -j4
BUILDDIR = docs/_build
docbuild: venv/build_info/docreqs
venv/build_info/docreqs: venv requirements-docs.txt
source venv/bin/activate && pip install -r requirements-docs.txt
mkdir -p venv/build_info/docreqs
touch venv/build_info/docreqs
html: docbuild
( \
source venv/bin/activate; \
sphinx-build -b html $(SPHINXOPTS) docs $(BUILDDIR)/html; \
)
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
latexpdf: docbuild
( \
source venv/bin/activate; \
sphinx-build -b latex $(SPHINXOPTS) docs $(BUILDDIR)/latex; \
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
)
@echo "Build finished. The PDF files are in $(BUILDDIR)/latex."
docs: html
.PHONY: clean purge test html latexpdf docs