views.main: Add an 'Unstage' button to the 'Actions' dock widget
[git-cola.git] / Makefile
blob831c13b372b20c49ad11a7c6986295acf4cf06e1
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 --quiet install \
26 --prefix=$(prefix) \
27 --root=$(DESTDIR) \
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: install-html
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)/share/applications/cola.desktop \
51 $(DESTDIR)$(prefix)/share/git-cola \
52 $(DESTDIR)$(prefix)/share/doc/git-cola
54 test: all
55 $(MAKE) -C test all
57 coverage:
58 @env PYTHONPATH=$(CURDIR):$(PYTHONPATH) \
59 nosetests --verbose --with-doctest --with-id --with-coverage \
60 --cover-package=cola
62 clean:
63 for dir in share/doc/git-cola test; do \
64 (cd $$dir && $(MAKE) clean); \
65 done
66 find cola -name '*.py[co]' -print0 | xargs -0 rm -f
67 find cola/gui -name '[^_]*.py' -print0 | xargs -0 rm -f
68 find jsonpickle -name '*.py[co]' -print0 | xargs -0 rm -f
69 find share -name '*.qm' -print0 | xargs -0 rm -f
70 find simplejson -name '*.py[co]' -print0 | xargs -0 rm -f
71 rm -rf build tmp
72 rm -f tags
74 tags:
75 ctags -R cola/*.py cola/views/*.py cola/controllers/*.py
77 .PHONY: all install doc install-doc install-html test clean darwin git-cola.app