Remove unneeded imports
[stgit.git] / Makefile
blob7c86781751865c00060c9ed94af3caaaf2393ff7
1 prefix ?= $(HOME)
2 DESTDIR ?= /
3 PYTHON ?= python
5 export DESTDIR PYTHON
7 TEST_PATCHES ?= ..
9 all:
10 $(PYTHON) setup.py build
12 install:
13 $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
15 doc:
16 $(MAKE) -C Documentation all
18 install-doc:
19 $(MAKE) -C Documentation install
21 install-html:
22 $(MAKE) -C Documentation install-html
24 test:
25 $(PYTHON) setup.py build
26 $(MAKE) -C t all
28 test_patches:
29 for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
30 stg goto $$patch && $(MAKE) test || break; \
31 done
33 coverage: coverage-test coverage-report
35 coverage-test:
36 $(PYTHON) -m coverage run setup.py build
37 COVERAGE_PROCESS_START=$(PWD)/.coveragerc $(MAKE) -C t all
38 $(PYTHON) -m coverage combine $$(find . -name '.coverage.*')
40 coverage-report:
41 $(PYTHON) -m coverage html --title="stgit coverage"
42 $(PYTHON) -m coverage report
43 @echo "HTML coverage report: file://$(PWD)/htmlcov/index.html"
45 clean:
46 for dir in Documentation t; do \
47 $(MAKE) -C $$dir clean; \
48 done
49 rm -rf build
50 rm -rf dist
51 rm -f stgit/*.pyc
52 rm -rf stgit/__pycache__
53 rm -f stgit/builtin_version.py
54 rm -f stgit/commands/*.pyc
55 rm -rf stgit/commands/__pycache__
56 rm -f stgit/commands/cmdlist.py
57 rm -f stgit/lib/*.pyc
58 rm -rf stgit/lib/__pycache__
59 rm -f TAGS tags
60 rm -f MANIFEST
61 rm -f stgit-completion.bash
63 tags:
64 ctags -R stgit/*
66 TAGS:
67 ctags -e -R stgit/*
69 .PHONY: all install doc install-doc install-html test test_patches \
70 coverage coverage-test coverage-report clean tags TAGS