1 # The default target of this Makefile is...
4 # The external commands used by this Makefile are...
10 # These values can be overridden on the command-line or via config.mak
12 bindir = $(prefix)/bin
15 cola_app_base
= git-cola.app
16 cola_app
= $(CURDIR
)/$(cola_app_base
)
17 cola_version
= $(shell env TERM
=dummy
$(PYTHON
) cola
/version.py
)
18 cola_dist
:= cola-
$(cola_version
)
20 python_path
= $(CURDIR
):$(CURDIR
)/thirdparty
:$(PYTHONPATH
)
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
25 all_test_flags
= --with-doctest
--exclude
=sphinxtogithub
$(test_flags
)
31 standalone_args ?
= --standalone
36 $(PYTHON
) setup.py build
39 $(PYTHON
) setup.py
--quiet
install \
41 --prefix=$(DESTDIR
)$(prefix) \
42 --install-scripts
=$(DESTDIR
)$(bindir) \
44 rm -f
$(DESTDIR
)$(python_site
)/git_cola
*
45 rmdir
-p
$(DESTDIR
)$(python_site
) 2>/dev
/null || true
46 (cd
$(DESTDIR
)$(bindir) && \
47 ! test -e cola
&& ln
-s git-cola cola
) || true
49 # Maintainer's dist target
51 $(GIT
) archive
--format
=tar --prefix=$(cola_dist
)/ HEAD^
{tree
} | \
52 gzip
-f
-9 - >$(cola_dist
).
tar.gz
55 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) all
58 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) html
61 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install
64 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install-html
67 rm -rf
$(DESTDIR
)$(prefix)/bin
/git-cola \
68 $(DESTDIR
)$(prefix)/bin
/cola \
69 $(DESTDIR
)$(prefix)/share
/applications
/cola.desktop \
70 $(DESTDIR
)$(prefix)/share
/git-cola \
71 $(DESTDIR
)$(prefix)/share
/doc
/git-cola
74 @env PYTHONPATH
=$(python_path
) \
75 $(NOSETESTS
) $(all_test_flags
)
78 @env PYTHONPATH
=$(python_path
) \
79 $(NOSETESTS
) --with-coverage
--cover-package
=cola
$(all_test_flags
)
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 rm -rf build
dist tmp
tags git-cola.app
87 rm -f cola
/builtin_version.py
*
90 find .
-name
'*.py' -print0 | xargs
-0 ctags
-f
tags
93 $(PYTHON
) setup.py build_pot
-N
-d .
96 $(PYTHON
) setup.py build_mo
-f
99 mkdir
-p
$(cola_app
)/Contents
/MacOS
100 cp darwin
/git-cola
$(cola_app
)/Contents
/MacOS
101 cp darwin
/Info.plist darwin
/PkgInfo
$(cola_app
)/Contents
102 $(MAKE
) prefix=$(cola_app
)/Contents
/Resources
install install-doc
103 cp darwin
/git-cola.icns
$(cola_app
)/Contents
/Resources
105 app-tarball
: git-cola.app
106 $(TAR
) czf git-cola-
$(cola_version
).app.
tar.gz
$(cola_app
)
108 .PHONY
: all install doc install-doc install-html
test clean tags
109 .PHONY
: git-cola.app app-tarball