3 PYTHON_VER ?
= $(shell $(PYTHON
) -c
'import platform; print platform.python_version()[:3]')
4 PYTHON_SITE ?
= $(DESTDIR
)$(prefix)/lib
/python
$(PYTHON_VER
)/site-packages
5 COLA_VERSION ?
= $(shell git describe
--match
='v*.*' | sed
-e s
/v
//)
7 APPZIP ?
= $(shell darwin
/name-tarball.py
)
9 TEST_PYTHONPATH ?
= "$(CURDIR)":"$(CURDIR)/thirdparty":"$(PYTHONPATH)"
15 standalone_args ?
= --standalone
19 $(PYTHON
) setup.py build
22 $(PYTHON
) darwin
/py2app-setup.py py2app
26 mv
dist/$(APP
) $(CURDIR
)
27 find
$(APP
) -name
'*_debug*' | xargs
rm -f
28 tar cjf
$(APPZIP
) $(APP
)
31 $(PYTHON
) setup.py
--quiet
install \
33 --install-scripts
=$(DESTDIR
)$(prefix)/bin \
34 --prefix=$(DESTDIR
)$(prefix) \
36 rm -f
$(PYTHON_SITE
)/git_cola
*
37 rmdir
-p
$(PYTHON_SITE
) 2>/dev
/null || true
38 (cd
$(DESTDIR
)$(prefix)/bin
&& \
39 ! test -e cola
&& ln
-s git-cola cola
) || true
41 # Maintainer's dist target
42 COLA_TARNAME ?
= cola-
$(COLA_VERSION
)
44 git archive
--format
=tar \
45 --prefix=$(COLA_TARNAME
)/ HEAD^
{tree
} > $(COLA_TARNAME
).
tar
46 @mkdir
-p
$(COLA_TARNAME
)/cola
47 @cp cola
/builtin_version.py
$(COLA_TARNAME
)/cola
48 @cp cola
/builtin_version.py
$(COLA_TARNAME
)/version
49 $(TAR
) rf
$(COLA_TARNAME
).
tar \
50 $(COLA_TARNAME
)/version \
51 $(COLA_TARNAME
)/cola
/builtin_version.py
52 @
$(RM
) -r
$(COLA_TARNAME
)
53 gzip
-f
-9 $(COLA_TARNAME
).
tar
56 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) all
59 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) html
62 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install
65 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install-html
68 rm -rf
$(DESTDIR
)$(prefix)/bin
/git-cola \
69 $(DESTDIR
)$(prefix)/bin
/cola \
70 $(DESTDIR
)$(prefix)/share
/applications
/cola.desktop \
71 $(DESTDIR
)$(prefix)/share
/git-cola \
72 $(DESTDIR
)$(prefix)/share
/doc
/git-cola
75 all_test_flags ?
= --with-doctest
$(test_flags
)
78 @env PYTHONPATH
="$(TEST_PYTHONPATH)" \
79 nosetests
$(all_test_flags
)
82 @env PYTHONPATH
="$(TEST_PYTHONPATH)" \
83 nosetests
--with-coverage
--cover-package
=cola
$(all_test_flags
)
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 cola
/builtin_version.
* build
dist tmp
tags git-cola.app
93 ctags cola
/*.py cola
/*/*.py
test/*.py
96 $(PYTHON
) setup.py build_pot
-N
-d .
99 $(PYTHON
) setup.py build_mo
-f
101 .PHONY
: all install doc install-doc install-html
test clean darwin git-cola.app
tags