-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
120 lines (89 loc) · 3.08 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright (C) 2017 Alpha Griffin
# @%@~LICENSE~@%@
#
# A simple make file for any Python project.
# Adapted from the file auto-generated by sphinx-quickstart.
ARGS=
# You can set these variables from the command line.
SPHINXOPTS = -c etc/sphinx
SPHINXBUILD = sphinx-build
PAPER =
DOCDIR = doc
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(DOCDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: default
default: help
@echo
@echo "Please choose a make target and try again."
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " help display this help screen"
@echo ""
@echo " all to make all common tasks: python, docs"
@echo " clean to clean all common tasks: python_clean, docs_clean"
@echo ""
@echo " run run the application in-place; use ARGS= to set additional arguments"
@echo " e.g.: make ARGS='follow bitcoin life' run"
@echo " install to install what has been built to the system (first try make all)"
@echo ""
@echo " python to build Python code"
@echo " python_clean to clean up after Python build"
@echo ""
@echo " apidoc to generate new API template files for Sphinx"
@echo " apidoc_clean to remove the API template files for Sphinx (USE CAUTION: these may have been manually edited)"
@echo ""
@echo " docs to make all documentation: html, text, man, coverage"
@echo " docs_clean to clean up all generated documentation"
@echo " html to make standalone HTML files"
@echo " text to make text files"
@echo " man to make manual pages"
all: python docs
clean: docs_clean python_clean
python:
./setup.py build_py
python_clean:
./setup.py clean
rm -rf build
rm -rf *.egg-info
find . -type d -name __pycache__ | xargs -r rm -r
run:
./boiler $(ARGS)
install:
./setup.py install
install -pSv boiler /usr/local/bin
if [ -d "doc/man" ]; then \
install -d /usr/local/share/man/man1; \
cp -r doc/man/* /usr/local/share/man/man1; \
fi
apidoc:
sphinx-apidoc ag -o api
apidoc_clean:
rm -rf api
docs: html text man coverage
@echo "Documentation finished."
docs_clean:
rm -rf $(DOCDIR)/doctrees
rm -rf $(DOCDIR)/html
rm -rf $(DOCDIR)/text
rm -rf $(DOCDIR)/man
rm -rf $(DOCDIR)/coverage
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(DOCDIR)/html."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(DOCDIR)/text
@echo
@echo "Build finished. The text files are in $(DOCDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCDIR)/man
@echo
@echo "Build finished. The manual pages are in $(DOCDIR)/man."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(DOCDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(DOCDIR)/coverage/python.txt."