Makefile 947 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. DESTDIR=/
  11. all: build
  12. doc:: pydoctor
  13. pydoctor::
  14. $(PYDOCTOR) --make-html -c dulwich.cfg
  15. build::
  16. $(SETUP) build
  17. $(SETUP) build_ext -i
  18. install::
  19. $(SETUP) install --root="$(DESTDIR)"
  20. check:: build
  21. $(RUNTEST) dulwich.tests.test_suite
  22. check-tutorial:: build
  23. $(RUNTEST) dulwich.tests.tutorial_test_suite
  24. check-nocompat:: build
  25. $(RUNTEST) dulwich.tests.nocompat_test_suite
  26. check-compat:: build
  27. $(RUNTEST) dulwich.tests.compat_test_suite
  28. check-pypy:: clean
  29. $(MAKE) check-noextensions PYTHON=pypy
  30. check-noextensions:: clean
  31. $(RUNTEST) dulwich.tests.test_suite
  32. check-all: check check-pypy check-noextensions
  33. clean::
  34. $(SETUP) clean --all
  35. rm -f dulwich/*.so