doc: Update release notes
[git-cola.git] / Makefile
blob546eea162ed0d001e409b3765448c1c4e50195d2
1 # The default target of this Makefile is...
2 all::
4 # The external commands used by this Makefile are...
5 GIT = git
6 NOSETESTS = nosetests
7 PYTHON = python
8 TAR = tar
10 # These values can be overridden on the command-line or via config.mak
11 prefix = $(HOME)
12 bindir = $(prefix)/bin
13 # DESTDIR =
15 cola_base := git-cola
16 cola_app_base= $(cola_base).app
17 cola_app = $(CURDIR)/$(cola_app_base)
18 cola_version = $(shell env TERM=dummy $(PYTHON) cola/version.py)
19 cola_dist := $(cola_base)-$(cola_version)
21 python_version = $(shell env TERM=dummy $(PYTHON) -c 'import distutils.sysconfig as sc; print(sc.get_python_version())')
22 python_site := $(prefix)/lib*/python$(python_version)/site-packages
24 test_flags =
25 all_test_flags = --with-doctest --exclude=sphinxtogithub $(test_flags)
27 # User customizations
28 -include config.mak
31 all::
32 $(PYTHON) setup.py build
34 install: all
35 $(PYTHON) setup.py --quiet install \
36 --prefix=$(DESTDIR)$(prefix) \
37 --install-scripts=$(DESTDIR)$(bindir) \
38 --force && \
39 rm -f $(DESTDIR)$(python_site)/git_cola*
40 rmdir -p $(DESTDIR)$(python_site) 2>/dev/null || true
41 (cd $(DESTDIR)$(bindir) && \
42 ! test -e cola && ln -s git-cola cola) || true
44 # Maintainer's dist target
45 dist:
46 $(GIT) archive --format=tar --prefix=$(cola_dist)/ HEAD^{tree} | \
47 gzip -f -9 - >$(cola_dist).tar.gz
49 doc:
50 $(MAKE) -C share/doc/git-cola prefix=$(prefix) all
52 html:
53 $(MAKE) -C share/doc/git-cola prefix=$(prefix) html
55 install-doc:
56 $(MAKE) -C share/doc/git-cola prefix=$(prefix) install
58 install-html:
59 $(MAKE) -C share/doc/git-cola prefix=$(prefix) install-html
61 uninstall:
62 rm -rf $(DESTDIR)$(prefix)/bin/git-cola \
63 $(DESTDIR)$(prefix)/bin/git-dag \
64 $(DESTDIR)$(prefix)/bin/cola \
65 $(DESTDIR)$(prefix)/share/applications/git-cola.desktop \
66 $(DESTDIR)$(prefix)/share/applications/git-dag.desktop \
67 $(DESTDIR)$(prefix)/share/git-cola \
68 $(DESTDIR)$(prefix)/share/doc/git-cola
69 rm -f $(DESTDIR)$(prefix)/share/locale/*/LC_MESSAGES/git-cola.mo
70 rmdir $(DESTDIR)$(prefix)/share/locale/*/LC_MESSAGES 2>/dev/null || true
71 rmdir $(DESTDIR)$(prefix)/share/locale/* 2>/dev/null || true
72 rmdir $(DESTDIR)$(prefix)/share/locale 2>/dev/null || true
73 rmdir $(DESTDIR)$(prefix)/share/doc 2>/dev/null || true
74 rmdir $(DESTDIR)$(prefix)/share/applications 2>/dev/null || true
75 rmdir $(DESTDIR)$(prefix)/share 2>/dev/null || true
76 rmdir $(DESTDIR)$(prefix)/bin 2>/dev/null || true
77 rmdir $(DESTDIR)$(prefix) 2>/dev/null || true
79 test: all
80 $(NOSETESTS) $(all_test_flags)
82 coverage:
83 $(NOSETESTS) --with-coverage --cover-package=cola $(all_test_flags)
85 clean:
86 $(MAKE) -C share/doc/git-cola clean
87 find . -name .noseids -print0 | xargs -0 rm -f
88 find . -name '*.py[co]' -print0 | xargs -0 rm -f
89 rm -rf build dist tmp tags git-cola.app
90 rm -rf share/locale
92 tags:
93 find . -name '*.py' -print0 | xargs -0 ctags -f tags
95 pot:
96 $(PYTHON) setup.py build_pot -N -d .
98 mo:
99 $(PYTHON) setup.py build_mo -f
101 git-cola.app:
102 mkdir -p $(cola_app)/Contents/MacOS
103 cp darwin/git-cola $(cola_app)/Contents/MacOS
104 cp darwin/Info.plist darwin/PkgInfo $(cola_app)/Contents
105 $(MAKE) prefix=$(cola_app)/Contents/Resources install install-doc
106 cp darwin/git-cola.icns $(cola_app)/Contents/Resources
108 app-tarball: git-cola.app
109 $(TAR) czf $(cola_dist).app.tar.gz $(cola_app_base)
111 .PHONY: all install doc install-doc install-html test clean tags
112 .PHONY: git-cola.app app-tarball