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
16 cola_app_base
= $(cola_base
).app
17 cola_app
= $(CURDIR
)/$(cola_app_base
)
18 cola_version
= $(shell env TERM
=dummy
$(PYTHON
) cola
/version.py
)
19 cola_dist
:= $(cola_base
)-$(cola_version
)
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
)
32 $(PYTHON
) setup.py build
35 $(PYTHON
) setup.py
--quiet
install \
36 --prefix=$(DESTDIR
)$(prefix) \
37 --install-scripts
=$(DESTDIR
)$(bindir) \
39 rm -f
$(DESTDIR
)$(python_site
)/git_cola
*
40 rmdir
-p
$(DESTDIR
)$(python_site
) 2>/dev
/null || true
41 (cd
$(DESTDIR
)$(bindir) && \
42 ! test -e cola
&& ln
-s git-cola cola
) || true
44 # Maintainer's dist target
46 $(GIT
) archive
--format
=tar --prefix=$(cola_dist
)/ HEAD^
{tree
} | \
47 gzip
-f
-9 - >$(cola_dist
).
tar.gz
50 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) all
53 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) html
56 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install
59 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install-html
62 rm -rf
$(DESTDIR
)$(prefix)/bin
/git-cola \
63 $(DESTDIR
)$(prefix)/bin
/git-dag \
64 $(DESTDIR
)$(prefix)/bin
/cola \
65 $(DESTDIR
)$(prefix)/share
/applications
/git-cola.desktop \
66 $(DESTDIR
)$(prefix)/share
/applications
/git-dag.desktop \
67 $(DESTDIR
)$(prefix)/share
/git-cola \
68 $(DESTDIR
)$(prefix)/share
/doc
/git-cola
69 rm -f
$(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
/git-cola.mo
70 rmdir
$(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
2>/dev
/null || true
71 rmdir
$(DESTDIR
)$(prefix)/share
/locale
/* 2>/dev
/null || true
72 rmdir
$(DESTDIR
)$(prefix)/share
/locale
2>/dev
/null || true
73 rmdir
$(DESTDIR
)$(prefix)/share
/doc
2>/dev
/null || true
74 rmdir
$(DESTDIR
)$(prefix)/share
/applications
2>/dev
/null || true
75 rmdir
$(DESTDIR
)$(prefix)/share
2>/dev
/null || true
76 rmdir
$(DESTDIR
)$(prefix)/bin
2>/dev
/null || true
77 rmdir
$(DESTDIR
)$(prefix) 2>/dev
/null || true
80 $(NOSETESTS
) $(all_test_flags
)
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 build
dist tmp
tags git-cola.app
93 find .
-name
'*.py' -print0 | xargs
-0 ctags
-f
tags
96 $(PYTHON
) setup.py build_pot
-N
-d .
99 $(PYTHON
) setup.py build_mo
-f
102 mkdir
-p
$(cola_app
)/Contents
/MacOS
103 cp darwin
/git-cola
$(cola_app
)/Contents
/MacOS
104 cp darwin
/Info.plist darwin
/PkgInfo
$(cola_app
)/Contents
105 $(MAKE
) prefix=$(cola_app
)/Contents
/Resources
install install-doc
106 cp darwin
/git-cola.icns
$(cola_app
)/Contents
/Resources
108 app-tarball
: git-cola.app
109 $(TAR
) czf
$(cola_dist
).app.
tar.gz
$(cola_app_base
)
111 .PHONY
: all install doc install-doc install-html
test clean tags
112 .PHONY
: git-cola.app app-tarball