-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
167 lines (133 loc) · 5.89 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# Makefile for Sphinx documentation
# Modified to include examples/* and tutorial/* files from docs to _build/html
#
# You can set these variables from the command line.
SPHINXOPTS = -q
SPHINXBUILD = sphinx-build
INDIR = docs
HTMLDIR = _build/html
# Internal variables.
ALLSPHINXOPTS = -d _build/doctrees $(SPHINXOPTS) $(INDIR)
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
docs/conf.py.txt: docs/conf.py
python3 pylit.py docs/conf.py
docs/examples/setup.py.txt: setup.py
python3 pylit.py setup.py docs/examples/setup.py.txt
docs/examples/pylit.py.txt: pylit.py
python3 pylit.py pylit.py docs/examples/pylit.py.txt
docs/examples/pylit_test.py.txt: test/pylit_test.py
python3 pylit.py --comment-string='## ' test/pylit_test.py docs/examples/pylit_test.py.txt
docs/tutorial/hello.py.txt: docs/tutorial/hello.py
python3 pylit.py docs/tutorial/hello.py
docs/tutorial/hello_2.py: docs/tutorial/hello_2.py.txt
python3 pylit.py docs/tutorial/hello_2.py.txt
docs/tutorial/hello_with_header.py: docs/tutorial/hello_with_header.py.txt
python3 pylit.py docs/tutorial/hello_with_header.py.txt
docs/tutorial/hello_with_doctest.py.txt: docs/tutorial/hello_with_doctest.py
python3 pylit.py --doctest docs/tutorial/hello_with_doctest.py
python3 pylit.py docs/tutorial/hello_with_doctest.py
docs/tutorial/hello_with_doctest_2.py.txt: docs/tutorial/hello_with_doctest_2.py
python3 pylit.py --doctest docs/tutorial/hello_with_doctest_2.py
python3 pylit.py docs/tutorial/hello_with_doctest_2.py
docs/tutorial/greeting.py.txt: docs/tutorial/greeting.py
python3 pylit.py docs/tutorial/greeting.py
docs/tutorial/hello_multifile.py.txt: docs/tutorial/hello_multifile.py docs/tutorial/greeting.py.txt
python3 pylit.py docs/tutorial/hello_multifile.py
docs/examples/simplestates.py: docs/examples/simplestates.py.txt
python3 pylit.py docs/examples/simplestates.py.txt
docs/examples/simplestates_test.py: docs/examples/simplestates_test.py.txt
python3 pylit.py docs/examples/simplestates_test.py.txt
(cd docs/examples; python3 simplestates_test.py)
docs/examples/iterqueue.py: docs/examples/iterqueue.py.txt
python3 pylit.py docs/examples/iterqueue.py.txt
(cd docs/examples; python3 ../../pylit.py --doctest iterqueue.py.txt)
docs/examples/iterqueue_test.py: docs/examples/iterqueue_test.py.txt
python3 pylit.py docs/examples/iterqueue_test.py.txt
(cd docs/examples; python3 iterqueue_test.py)
docs/examples/iterqueue_speed_test.py: docs/examples/iterqueue_speed_test.py.txt
python3 pylit.py docs/examples/iterqueue_speed_test.py.txt
(cd docs/examples; python3 iterqueue_speed_test.py)
docs/examples/testfile_literate.py: docs/examples/testfile_literate.py.txt
python3 pylit.py docs/examples/testfile_literate.py.txt
(cd docs/examples; python3 -m doctest -v testfile_literate.py.txt )
docs/examples/testmod_literate.py: docs/examples/testmod_literate.py.txt
python3 pylit.py docs/examples/testmod_literate.py.txt
(cd docs/examples; PYTHONPATH=../.. python3 testmod_literate.py )
OTHERS = docs/conf.py.txt \
docs/examples/pylit.py.txt \
docs/examples/setup.py.txt \
docs/examples/pylit_test.py.txt \
docs/examples/simplestates.py \
docs/examples/simplestates_test.py \
docs/examples/iterqueue.py \
docs/examples/iterqueue_test.py \
docs/examples/iterqueue_speed_test.py \
docs/examples/testfile_literate.py \
docs/examples/testmod_literate.py \
docs/tutorial/hello.py.txt \
docs/tutorial/hello_2.py \
docs/tutorial/hello_with_header.py \
docs/tutorial/hello_with_doctest.py.txt \
docs/tutorial/hello_with_doctest_2.py.txt \
docs/tutorial/greeting.py.txt \
docs/tutorial/hello_multifile.py.txt
clean:
-rm -rf _build/*
html: $(OTHERS)
mkdir -p $(HTMLDIR) _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLDIR)
@echo
@echo "Copying some source files"
cp $(INDIR)/download/pylit $(HTMLDIR)/download/
cp $(INDIR)/examples/*.txt $(HTMLDIR)/examples/
cp $(INDIR)/tutorial/*.py $(HTMLDIR)/tutorial/
cp $(INDIR)/tutorial/*.py.txt $(HTMLDIR)/tutorial/
# cp $(INDIR)/examples/*.py $(HTMLDIR)/examples/
# cp $(INDIR)/examples/*.sty $(HTMLDIR)/examples/
# cp $(INDIR)/examples/*.css $(HTMLDIR)/examples/
@echo
@echo "Build finished: HTML pages are in $(HTMLDIR)"
pickle: $(OTHERS)
mkdir -p _build/pickle _build/doctrees
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
@echo
@echo "Build finished; now you can process the pickle files."
web: pickle
json: $(OTHERS)
mkdir -p _build/json _build/doctrees
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in _build/htmlhelp."
latex: $(OTHERS)
mkdir -p _build/latex _build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
@echo
@echo "Build finished; the LaTeX files are in _build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
changes: $(OTHERS)
mkdir -p _build/changes _build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
@echo
@echo "The overview file is in _build/changes."
linkcheck:
mkdir -p _build/linkcheck _build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in _build/linkcheck/output.txt."