Merge support for lazy loading packs.
[jelmer/dulwich-libgit2.git] / Makefile
index 516e41c3f30d6380f73f50fca422041ceb84bf2a..aea43348b082023ee005478821a795a2e4948d6a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,15 @@
 PYTHON = python
 SETUP = $(PYTHON) setup.py
-TRIAL = trial
+PYDOCTOR ?= pydoctor
+TESTRUNNER = $(shell which nosetests)
+TESTFLAGS =
 
-all: build 
+all: build
+
+doc:: pydoctor
+
+pydoctor::
+       $(PYDOCTOR) --make-html -c dulwich.cfg
 
 build::
        $(SETUP) build
@@ -12,10 +19,21 @@ install::
        $(SETUP) install
 
 check:: build
-       PYTHONPATH=. $(TRIAL) dulwich
+       PYTHONPATH=. $(PYTHON) $(TESTRUNNER) dulwich
+       which git > /dev/null && PYTHONPATH=. $(PYTHON) $(TESTRUNNER) $(TESTFLAGS) -i compat
 
 check-noextensions:: clean
-       PYTHONPATH=. $(TRIAL) dulwich
+       PYTHONPATH=. $(PYTHON) $(TESTRUNNER) $(TESTFLAGS) dulwich
+
+check-compat:: build
+       PYTHONPATH=. $(PYTHON) $(TESTRUNNER) $(TESTFLAGS) -i compat
 
 clean::
-       $(SETUP) clean
+       $(SETUP) clean --all
+       rm -f dulwich/*.so
+
+coverage:: build
+       PYTHONPATH=. $(PYTHON) $(TESTRUNNER) --cover-package=dulwich --with-coverage --cover-erase --cover-inclusive dulwich
+
+coverage-annotate: coverage
+       python-coverage -a -o /usr