1SPHINXOPTS = -W 2SPHINXBUILD = sphinx-build 3DOCDIR = doc 4DOCHTML = $(DOCDIR)/html 5DOCTREES = $(DOCDIR)/doctrees 6ALLSPHINXOPTS = -d $(DOCTREES) $(SPHINXOPTS) $(DOCDIR) 7 8MODNAME = posix1e.so 9RSTFILES = doc/index.rst doc/module.rst NEWS README doc/conf.py 10 11all: 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 20doc: $(DOCHTML)/index.html 21 22dist: 23 fakeroot ./setup.py sdist 24 25test: 26 @for ver in 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4; do \ 27 if type python$$ver >/dev/null; then \ 28 echo Testing with python$$ver; \ 29 python$$ver ./setup.py test -q; \ 30 fi; \ 31 done 32 @if type pypy >/dev/null; then \ 33 echo Testing with pypy; \ 34 pypy ./setup.py test -q; \ 35 fi 36 37clean: 38 rm -rf $(DOCHTML) $(DOCTREES) 39 rm -f $(MODNAME) 40 rm -rf build 41 42.PHONY: doc test clean dist 43