]> gitweb.michael.orlitzky.com - dunshire.git/blob - makefile
122096547f336f92ad28e6f97d795559c41cb78d
[dunshire.git] / makefile
1 PN := dunshire
2 SRCS := $(PN)/*.py test/*.py
3
4 # Sphinx tries to keep track of which docs need to be built on its
5 # own. We could do better, but we would have to duplicate all of the
6 # information that we already gave Sphinx to make it work. Thus the
7 # "doc" target will unconditionally invoke sphinx.
8 .PHONY: doc
9 doc:
10 cd doc && $(MAKE) html
11
12 # Run the doctests contained in the sphinx documentation, which aren't
13 # run as part of the normal test suite (because nobody wants to wait
14 # for sphinx to run).
15 .PHONY: doctest
16 doctest:
17 cd doc && $(MAKE) doctest
18
19 # Run the test suite once.
20 .PHONY: check
21 check:
22 PYTHONPATH="." test/__main__.py
23
24 # Run the test suite forever, but only the parts of it that are
25 # randomized.
26 .PHONY: checkloop
27 checkloop:
28 PYTHONPATH="." test/__main__.py --no-doctests --loop
29
30 # Run pylint to obtain some unconstructive criticism on my coding style.
31 .PHONY: lint
32 lint:
33 pylint --rcfile=./.pylintrc $(SRCS)
34
35 # Create a source distribution tarball. First we clean up, to make
36 # sure no junk gets added to the distribution. Then we build the docs
37 # so that users will get some usable HTML documentation and not just
38 # the source files.
39 .PHONY: dist
40 dist: clean doc
41 python setup.py sdist
42
43 # Delete urrythang.
44 .PHONY: clean
45 clean:
46 rm -rf $(PN)/__pycache__ test/__pycache__ doc/build
47 rm -rf $(PN).egg-info
48 rm -rf dist