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*.*')
8 APPZIP ?
= $(shell darwin
/name-tarball.py
)
11 $(PYTHON
) setup.py build
&& rm -rf build
15 $(PYTHON
) darwin
/py2app-setup.py py2app
19 mv
dist/$(APP
) $(CURDIR
)
20 find
$(APP
) -name
'*_debug*' | xargs
rm -f
21 tar cjf
$(APPZIP
) $(APP
)
25 $(PYTHON
) setup.py
install \
27 --prefix=$(DESTDIR
)$(prefix) \
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
)) && \
36 $(MAKE
) -C share
/doc
/git-cola
all
39 $(MAKE
) -C share
/doc
/git-cola html
42 $(MAKE
) -C share
/doc
/git-cola
install
45 $(MAKE
) -C share
/doc
/git-cola install-html
48 rm -rf
$(DESTDIR
)$(prefix)/bin
/git-cola \
49 $(DESTDIR
)$(prefix)/bin
/cola \
50 $(DESTDIR
)$(prefix)/libexec
/git-cola \
51 $(DESTDIR
)$(prefix)/share
/applications
/cola.desktop \
52 $(DESTDIR
)$(prefix)/share
/git-cola \
53 $(DESTDIR
)$(prefix)/share
/doc
/git-cola
56 all_test_flags ?
= --with-doctest
$(test_flags
)
59 @env PYTHONPATH
="$(CURDIR)":"$(PYTHONPATH)" \
60 nosetests
$(all_test_flags
)
63 @env PYTHONPATH
=$(CURDIR
):$(PYTHONPATH
) \
64 nosetests
$(all_test_flags
) \
65 --with-coverage
--cover-package
=cola
68 $(MAKE
) -C share
/doc
/git-cola
clean
69 find .
-name .noseids
-print0 | xargs
-0 rm -f
70 find .
-name
'*.py[co]' -print0 | xargs
-0 rm -f
71 find share
-name
'*.qm' -print0 | xargs
-0 rm -f
75 ctags cola
/*.py cola
/*/*.py
77 .PHONY
: all install doc install-doc install-html
test clean darwin git-cola.app