doc: Update 1.4.1.2 release notes
[git-cola.git] / Makefile
blob7a9c8fde769f06ea6d200ca3f6a26d7078f07d3b
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_VERSION ?= $(shell git describe --match='v*.*' | sed -e s/v//)
7 APP ?= git-cola.app
8 APPZIP ?= $(shell darwin/name-tarball.py)
9 TAR ?= tar
11 # User customizations
12 -include config.mak
14 all:
15 $(PYTHON) setup.py build
17 darwin: all
18 $(PYTHON) darwin/py2app-setup.py py2app
20 $(APP): darwin
21 rm -rf $(APP)
22 mv dist/$(APP) $(CURDIR)
23 find $(APP) -name '*_debug*' | xargs rm -f
24 tar cjf $(APPZIP) $(APP)
26 install:
27 $(PYTHON) setup.py install \
28 --quiet \
29 --prefix=$(DESTDIR)$(prefix) \
30 --force && \
31 rm -f $(PYTHON_SITE)/git_cola* && \
32 (test -d $(PYTHON_SITE) && rmdir -p $(PYTHON_SITE) 2>/dev/null || true) && \
33 (cd $(DESTDIR)$(prefix)/bin && \
34 ((! test -e cola && ln -s git-cola cola) || true))
36 # Maintainer's dist target
37 COLA_TARNAME=cola-$(COLA_VERSION)
38 dist: all
39 git archive --format=tar \
40 --prefix=$(COLA_TARNAME)/ HEAD^{tree} > $(COLA_TARNAME).tar
41 @mkdir -p $(COLA_TARNAME)/cola
42 @cp cola/builtin_version.py $(COLA_TARNAME)/cola
43 @cp cola/builtin_version.py $(COLA_TARNAME)/version
44 $(TAR) rf $(COLA_TARNAME).tar \
45 $(COLA_TARNAME)/version \
46 $(COLA_TARNAME)/cola/builtin_version.py
47 @$(RM) -r $(COLA_TARNAME)
48 gzip -f -9 $(COLA_TARNAME).tar
50 doc:
51 $(MAKE) -C share/doc/git-cola prefix=$(prefix) all
53 html:
54 $(MAKE) -C share/doc/git-cola prefix=$(prefix) html
56 install-doc:
57 $(MAKE) -C share/doc/git-cola prefix=$(prefix) install
59 install-html:
60 $(MAKE) -C share/doc/git-cola prefix=$(prefix) install-html
62 uninstall:
63 rm -rf $(DESTDIR)$(prefix)/bin/git-cola \
64 $(DESTDIR)$(prefix)/bin/cola \
65 $(DESTDIR)$(prefix)/share/applications/cola.desktop \
66 $(DESTDIR)$(prefix)/share/git-cola \
67 $(DESTDIR)$(prefix)/share/doc/git-cola
69 test_flags ?=
70 all_test_flags ?= --with-doctest $(test_flags)
72 test: all
73 @env PYTHONPATH="$(CURDIR)":"$(PYTHONPATH)" \
74 nosetests $(all_test_flags)
76 coverage:
77 @env PYTHONPATH=$(CURDIR):$(PYTHONPATH) \
78 nosetests $(all_test_flags) \
79 --with-coverage --cover-package=cola
81 clean:
82 $(MAKE) -C share/doc/git-cola clean
83 find . -name .noseids -print0 | xargs -0 rm -f
84 find . -name '*.py[co]' -print0 | xargs -0 rm -f
85 find share -name '*.qm' -print0 | xargs -0 rm -f
86 rm -rf cola/builtin_version.* build dist tmp tags git-cola.app
88 tags:
89 ctags cola/*.py cola/*/*.py
91 .PHONY: all install doc install-doc install-html test clean darwin git-cola.app