Enable testing on more Python versions and PyPy
[pylibacl.git] / Makefile
1 SPHINXOPTS    = -W
2 SPHINXBUILD   = sphinx-build
3 DOCDIR        = doc
4 DOCHTML       = $(DOCDIR)/html
5 DOCTREES      = $(DOCDIR)/doctrees
6 ALLSPHINXOPTS = -d $(DOCTREES) $(SPHINXOPTS) $(DOCDIR)
7
8 MODNAME = posix1e.so
9 RSTFILES = doc/index.rst doc/module.rst NEWS README doc/conf.py
10
11 all: doc test
12
13 $(MODNAME): acl.c
14         ./setup.py build_ext --inplace
15
16 $(DOCHTML)/index.html: $(MODNAME) $(RSTFILES)
17         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCHTML)
18         touch $@
19
20 doc: $(DOCHTML)/index.html
21
22 test:
23         for ver in 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4; do \
24           if type python$$ver >/dev/null; then \
25             echo Testing with python$$ver; \
26             python$$ver ./setup.py test -q; \
27           fi; \
28         done
29         @if type pypy >/dev/null; then \
30           echo Testing with pypy; \
31         pypy ./setup.py test -q; \
32         fi
33
34
35 clean:
36         rm -rf $(DOCHTML) $(DOCTREES)
37         rm -f $(MODNAME)
38         rm -rf build
39
40 .PHONY: doc test clean