main: call git update-index before importing the version module
[git-cola.git] / Makefile
blobbf807e2086f7a8e9de514cb1f3220298a19610c4
1 prefix ?= $(HOME)
2 DESTDIR ?= /
3 PYTHON ?= python
5 all:
6 $(PYTHON) setup.py build
8 install:
9 $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
10 cd $(DESTDIR)$(prefix)/bin && rm -f cola && ln -s git-cola cola
12 doc:
13 cd share/doc/cola && $(MAKE) all
15 install-doc:
16 $(MAKE) -C share/doc/cola install
18 install-html:
19 $(MAKE) -C share/doc/cola install-html
21 uninstall:
22 rm -rf "$(DESTDIR)$(prefix)"/bin/git-cola \
23 "$(DESTDIR)$(prefix)"/bin/git-difftool \
24 "$(DESTDIR)$(prefix)"/bin/cola \
25 "$(DESTDIR)$(prefix)"/share/doc/cola \
26 "$(DESTDIR)$(prefix)"/share/cola \
27 "$(DESTDIR)$(prefix)"/share/applications/cola.desktop \
28 "$(DESTDIR)$(prefix)"/lib/python2.*/site-packages/cola \
29 "$(DESTDIR)$(prefix)"/lib/python2.*/site-packages/cola-*
31 test:
32 @env PYTHONPATH=$(CURDIR):$(CURDIR)/build/lib:$(PYTHONPATH) nosetests
34 clean:
35 for dir in share/doc/cola test; do \
36 (cd $$dir && $(MAKE) clean); \
37 done
38 find cola -name '*.py[co]' -print0 | xargs -0 rm -f
39 find cola/gui -name '[^_]*.py' -print0 | xargs -0 rm -f
40 find share -name '*.qm' -print0 | xargs -0 rm -f
41 rm -rf build tmp
42 rm -f tags
44 tags:
45 ctags -R cola/*.py cola/views/*.py cola/controllers/*.py
47 .PHONY: all install doc install-doc install-html test clean