1 # The default target of this Makefile is...
4 # The external commands used by this Makefile are...
19 # These values can be overridden on the command-line or via config.mak
21 bindir = $(prefix)/bin
22 coladir
= $(prefix)/share
/git-cola
/lib
23 darwin_python
= /System
/Library
/Frameworks
/Python.framework
/Resources
/Python.app
/Contents
/MacOS
/Python
27 cola_app_base
= $(cola_base
).app
28 cola_app
= $(CURDIR
)/$(cola_app_base
)
29 cola_version
= $(shell $(PYTHON
) bin
/git-cola version
--brief
)
30 cola_dist
:= $(cola_base
)-$(cola_version
)
33 all_test_flags
= --with-doctest
--exclude
=sphinxtogithub
$(test_flags
)
38 setup_args
= --prefix=$(prefix)
41 setup_args
+= --install-scripts
=$(bindir)
42 setup_args
+= --record
=build
/MANIFEST
43 setup_args
+= --install-lib
=$(coladir
)
45 setup_args
+= --root
=$(DESTDIR
)
50 $(PYTHON
) setup.py build
53 $(PYTHON
) setup.py
install $(setup_args
)
54 (cd
$(DESTDIR
)$(bindir) && \
55 ! test -e cola
&& $(LN
) -s git-cola cola
) || true
56 $(RM_R
) $(DESTDIR
)$(coladir
)/git_cola
*
57 $(RM_R
) git_cola.egg-info
59 # Maintainer's dist target
61 $(GIT
) archive
--format
=tar --prefix=$(cola_dist
)/ HEAD^
{tree
} | \
62 $(GZIP
) -f
-9 - >$(cola_dist
).
tar.gz
65 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) all
68 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) html
71 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install
74 $(MAKE
) -C share
/doc
/git-cola
prefix=$(prefix) install-html
77 $(RM
) $(DESTDIR
)$(prefix)/bin
/git-cola
78 $(RM
) $(DESTDIR
)$(prefix)/bin
/git-dag
79 $(RM
) $(DESTDIR
)$(prefix)/bin
/cola
80 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-cola.desktop
81 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-dag.desktop
82 $(RM_R
) $(DESTDIR
)$(prefix)/share
/git-cola
83 $(RM_R
) $(DESTDIR
)$(prefix)/share
/doc
/git-cola
84 $(RM
) $(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
/git-cola.mo
85 $(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
2>/dev
/null || true
86 $(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
/* 2>/dev
/null || true
87 $(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
2>/dev
/null || true
88 $(RMDIR
) $(DESTDIR
)$(prefix)/share
/doc
2>/dev
/null || true
89 $(RMDIR
) $(DESTDIR
)$(prefix)/share
/applications
2>/dev
/null || true
90 $(RMDIR
) $(DESTDIR
)$(prefix)/share
2>/dev
/null || true
91 $(RMDIR
) $(DESTDIR
)$(prefix)/bin
2>/dev
/null || true
92 $(RMDIR
) $(DESTDIR
)$(prefix) 2>/dev
/null || true
95 $(NOSETESTS
) $(all_test_flags
)
98 $(NOSETESTS
) --with-coverage
--cover-package
=cola
$(all_test_flags
)
101 $(MAKE
) -C share
/doc
/git-cola
clean
102 $(FIND
) .
-name .noseids
-print0 | xargs
-0 rm -f
103 $(FIND
) .
-name
'*.py[co]' -print0 | xargs
-0 rm -f
104 $(RM_R
) build
dist tmp
tags git-cola.app
108 $(FIND
) .
-name
'*.py' -print0 | xargs
-0 $(CTAGS
) -f
tags
111 $(PYTHON
) setup.py build_pot
-N
-d .
114 $(PYTHON
) setup.py build_mo
-f
117 $(MKDIR_P
) $(cola_app
)/Contents
/MacOS
118 $(MKDIR_P
) $(cola_app
)/Contents
/Resources
119 $(CP
) contrib
/darwin
/Info.plist darwin
/PkgInfo
$(cola_app
)/Contents
120 $(CP
) contrib
/darwin
/git-cola
$(cola_app
)/Contents
/MacOS
121 $(CP
) contrib
/darwin
/git-cola.icns
$(cola_app
)/Contents
/Resources
122 $(MAKE
) prefix=$(cola_app
)/Contents
/Resources
install install-doc
123 $(LN
) -sf
$(darwin_python
) $(cola_app
)/Contents
/Resources
/git-cola
125 app-tarball
: git-cola.app
126 $(TAR
) czf
$(cola_dist
).app.
tar.gz
$(cola_app_base
)
128 .PHONY
: all install doc install-doc install-html
test clean tags
129 .PHONY
: git-cola.app app-tarball