doc: Document the 'git cola --classic' option
[git-cola.git] / Makefile
blob6b71e1e0056551ba8cd37357fb3e0fc5e82b1fe2
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
13 darwin: all
14 $(PYTHON) darwin/py2app-setup.py py2app
16 $(APP): darwin
17 rm -rf $(APP)
18 mv dist/$(APP) $(CURDIR)
19 find $(APP) -name '*_debug*' | xargs rm -f
20 tar cjf $(APPZIP) $(APP)
22 install:
23 $(PYTHON) setup.py install \
24 --quiet \
25 --prefix=$(DESTDIR)$(prefix) \
26 --force && \
27 rm -f $(PYTHON_SITE)/git_cola* && \
28 (test -d $(PYTHON_SITE) && rmdir -p $(PYTHON_SITE) 2>/dev/null || true) && \
29 (cd $(DESTDIR)$(prefix)/bin && \
30 ((! test -e cola && ln -s git-cola cola) || true))
32 doc:
33 $(MAKE) -C share/doc/git-cola all
35 html:
36 $(MAKE) -C share/doc/git-cola html
38 install-doc:
39 $(MAKE) -C share/doc/git-cola install
41 install-html:
42 $(MAKE) -C share/doc/git-cola install-html
44 uninstall:
45 rm -rf $(DESTDIR)$(prefix)/bin/git-cola \
46 $(DESTDIR)$(prefix)/bin/cola \
47 $(DESTDIR)$(prefix)/share/applications/cola.desktop \
48 $(DESTDIR)$(prefix)/share/git-cola \
49 $(DESTDIR)$(prefix)/share/doc/git-cola
51 test_flags ?=
52 all_test_flags ?= --with-doctest $(test_flags)
54 test: all
55 @env PYTHONPATH="$(CURDIR)":"$(PYTHONPATH)" \
56 nosetests $(all_test_flags)
58 coverage:
59 @env PYTHONPATH=$(CURDIR):$(PYTHONPATH) \
60 nosetests $(all_test_flags) \
61 --with-coverage --cover-package=cola
63 clean:
64 $(MAKE) -C share/doc/git-cola clean
65 find . -name .noseids -print0 | xargs -0 rm -f
66 find . -name '*.py[co]' -print0 | xargs -0 rm -f
67 find share -name '*.qm' -print0 | xargs -0 rm -f
68 rm -rf cola/builtin_version.* build dist tmp tags git-cola.app
70 tags:
71 ctags cola/*.py cola/*/*.py
73 .PHONY: all install doc install-doc install-html test clean darwin git-cola.app