doc: Add git-cola-1.3.7 release notes
[git-cola.git] / Makefile
blob37cd65cc37f2baede0ef38137edfb55ebc9c653f
1 prefix ?= $(HOME)
2 DESTDIR ?= /
3 PYTHON ?= python
4 PYTHON_VER ?= $(shell $(PYTHON) -c 'import platform; print platform.python_version()[:3]')
5 PYTHON_SITE ?= $(DESTDIR)$(prefix)/lib/python$(PYTHON_VER)/site-packages
6 COLA_VER ?= $(shell git describe --abbrev=4 --match='v*.*')
7 APP ?= git-cola.app
8 APPZIP ?= $(shell darwin/name-tarball.py)
10 all:
11 $(PYTHON) setup.py build && rm -rf build
13 darwin: all
14 rm -rf dist
15 $(PYTHON) darwin/py2app-setup.py py2app
17 $(APP): darwin
18 rm -rf $(APP)
19 mv dist/$(APP) $(CURDIR)
20 find $(APP) -name '*_debug*' | xargs rm -f
21 tar cjf $(APPZIP) $(APP)
22 rm -rf build dist
24 install:
25 $(PYTHON) setup.py install \
26 --quiet \
27 --prefix=$(DESTDIR)$(prefix) \
28 --force && \
29 rm -f $(PYTHON_SITE)/git_cola* && \
30 (test -d $(PYTHON_SITE) && rmdir -p $(PYTHON_SITE) 2>/dev/null || true) && \
31 (cd $(DESTDIR)$(prefix)/bin && \
32 ((! test -e cola && ln -s git-cola cola) || true)) && \
33 rm -rf build
35 doc:
36 $(MAKE) -C share/doc/git-cola all
38 html:
39 $(MAKE) -C share/doc/git-cola html
41 install-doc:
42 $(MAKE) -C share/doc/git-cola install
44 install-html:
45 $(MAKE) -C share/doc/git-cola install-html
47 uninstall:
48 rm -rf $(DESTDIR)$(prefix)/bin/git-cola \
49 $(DESTDIR)$(prefix)/bin/cola \
50 $(DESTDIR)$(prefix)/libexec/git-cola \
51 $(DESTDIR)$(prefix)/share/applications/cola.desktop \
52 $(DESTDIR)$(prefix)/share/git-cola \
53 $(DESTDIR)$(prefix)/share/doc/git-cola
55 test_flags ?=
56 all_test_flags ?= --with-doctest $(test_flags)
58 test:
59 @env PYTHONPATH="$(CURDIR)":"$(PYTHONPATH)" \
60 nosetests $(all_test_flags)
62 coverage:
63 @env PYTHONPATH=$(CURDIR):$(PYTHONPATH) \
64 nosetests $(all_test_flags) \
65 --with-coverage --cover-package=cola
67 clean:
68 $(MAKE) -C share/doc/git-cola clean
69 find . -name .noseids -print0 | xargs -0 rm -f
70 find . -name '*.py[co]' -print0 | xargs -0 rm -f
71 find share -name '*.qm' -print0 | xargs -0 rm -f
72 rm -rf build tmp tags
74 tags:
75 ctags cola/*.py cola/*/*.py
77 .PHONY: all install doc install-doc install-html test clean darwin git-cola.app