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
//)
8 APPZIP ?
= $(shell darwin
/name-tarball.py
)
15 $(PYTHON
) setup.py build
18 $(PYTHON
) darwin
/py2app-setup.py py2app
22 mv
dist/$(APP
) $(CURDIR
)
23 find
$(APP
) -name
'*_debug*' | xargs
rm -f
24 tar cjf
$(APPZIP
) $(APP
)
27 $(PYTHON
) setup.py
install \
29 --prefix=$(DESTDIR
)$(prefix) \
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
)
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
51 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) all
54 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) html
57 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install
60 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install-html
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
70 all_test_flags ?
= --with-doctest
$(test_flags
)
73 @env PYTHONPATH
="$(CURDIR)":"$(PYTHONPATH)" \
74 nosetests
$(all_test_flags
)
77 @env PYTHONPATH
=$(CURDIR
):$(PYTHONPATH
) \
78 nosetests
$(all_test_flags
) \
79 --with-coverage
--cover-package
=cola
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
89 ctags cola
/*.py cola
/*/*.py
91 .PHONY
: all install doc install-doc install-html
test clean darwin git-cola.app