-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
150 lines (117 loc) · 4.94 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Copyright (C) 2017 Alpha Griffin
# @%@~LICENSE~@%@
#
# Makefile for Alpha Griffin project.
# Adapted from the file auto-generated by sphinx-quickstart.
# 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 " 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 " bdist to make binary distribution"
@echo " bdist_clean to clean up binary distributions"
@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 " dirhtml to make HTML files named index.html in directories"
# @echo " singlehtml to make a single large HTML file"
# @echo " pickle to make pickle files"
# @echo " json to make JSON files"
# @echo " htmlhelp to make HTML files and a HTML help project"
# @echo " qthelp to make HTML files and a qthelp project"
# @echo " applehelp to make an Apple Help Book"
# @echo " devhelp to make HTML files and a Devhelp project"
# @echo " epub to make an epub"
# @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
# @echo " latexpdf to make LaTeX files and run them through pdflatex"
# @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
# @echo " texinfo to make Texinfo files"
# @echo " info to make Texinfo files and run them through makeinfo"
# @echo " gettext to make PO message catalogs"
# @echo " changes to make an overview of all changed/added/deprecated items"
# @echo " xml to make Docutils-native XML files"
# @echo " pseudoxml to make pseudoxml-XML files for display purposes"
# @echo " linkcheck to check all external links for integrity"
# @echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
all: python docs
clean: docs_clean python_clean
python:
./setup.py build
python_clean:
./setup.py clean
rm -rf build
rm -rf *.egg-info
find . -type d -name __pycache__ | xargs rm -rf
bdist:
./setup.py bdist_wheel
@echo "Binary distributables finished."
bdist_clean:
rm -rf dist
install:
./setup.py install
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
# User-friendly check for sphinx-build
#sphinx:
#ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
#$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
#endif
html: #sphinx
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(DOCDIR)/html."
text: #sphinx
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(DOCDIR)/text
@echo
@echo "Build finished. The text files are in $(DOCDIR)/text."
man: #sphinx
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCDIR)/man
@echo
@echo "Build finished. The manual pages are in $(DOCDIR)/man."
coverage: #sphinx
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(DOCDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(DOCDIR)/coverage/python.txt."