Makefile 779 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. PYTHON = python
  2. SETUP = $(PYTHON) setup.py
  3. PYDOCTOR ?= pydoctor
  4. ifeq ($(shell $(PYTHON) -c "import sys; print sys.version_info >= (2, 7)"),True)
  5. TESTRUNNER ?= unittest
  6. else
  7. TESTRUNNER ?= unittest2.__main__
  8. endif
  9. RUNTEST = PYTHONPATH=.:$(PYTHONPATH) $(PYTHON) -m $(TESTRUNNER)
  10. all: build
  11. doc:: pydoctor
  12. pydoctor::
  13. $(PYDOCTOR) --make-html -c dulwich.cfg
  14. build::
  15. $(SETUP) build
  16. $(SETUP) build_ext -i
  17. install::
  18. $(SETUP) install
  19. check:: build
  20. $(RUNTEST) dulwich.tests.test_suite
  21. check-nocompat:: build
  22. $(RUNTEST) dulwich.tests.nocompat_test_suite
  23. check-pypy:: clean
  24. $(MAKE) check-noextensions PYTHON=pypy
  25. check-noextensions:: clean
  26. $(RUNTEST) dulwich.tests.test_suite
  27. check-all: check check-pypy check-noextensions
  28. clean::
  29. $(SETUP) clean --all
  30. rm -f dulwich/*.so