1 # The default target of this Makefile is...
4 # The external commands used by this Makefile are...
25 FLAKE8_FLAGS
= --max-line-length
=80 --statistics
--doctests
--format
=pylint
26 PYLINT_FLAGS
= --py3k
--output-format
=colorized
--rcfile
=.pylintrc
28 # These values can be overridden on the command-line or via config.mak
30 bindir = $(prefix)/bin
31 datadir = $(prefix)/share
/git-cola
32 coladir
= $(datadir)/lib
33 hicolordir
= $(prefix)/share
/icons
/hicolor
/scalable
/apps
34 darwin_python
= /System
/Library
/Frameworks
/Python.framework
/Resources
/Python.app
/Contents
/MacOS
/Python
38 cola_app_base
= $(cola_base
).app
39 cola_app
= $(CURDIR
)/$(cola_app_base
)
40 cola_version
= $(shell $(PYTHON
) bin
/git-cola version
--brief
)
41 cola_dist
:= $(cola_base
)-$(cola_version
)
43 # Allows e.g. "make test flags=--stop"
45 NOSE ?
= $(NOSETESTS
) --with-doctest
--with-id
--exclude
=sphinxtogithub
$(flags
)
47 SETUP ?
= $(PYTHON
) setup.py
48 setup_args
+= --prefix=$(prefix)
51 setup_args
+= --install-scripts
=$(bindir)
52 setup_args
+= --record
=build
/MANIFEST
53 setup_args
+= --install-lib
=$(coladir
)
55 setup_args
+= --root
=$(DESTDIR
)
63 ALL_PYTHON_DIRS
= $(PYTHON_DIRS
)
64 ALL_PYTHON_DIRS
+= extras
66 PYTHON_SOURCES
= bin
/git-cola
67 PYTHON_SOURCES
+= bin
/git-dag
68 PYTHON_SOURCES
+= share
/git-cola
/bin
/git-xbase
69 PYTHON_SOURCES
+= setup.py
82 $(SETUP
) install $(setup_args
)
83 $(MKDIR_P
) $(DESTDIR
)$(hicolordir
)
84 $(LN_S
) $(datadir)/icons
/git-cola.svg
$(DESTDIR
)$(hicolordir
)/git-cola.svg
85 $(LN_S
) git-cola
$(DESTDIR
)$(bindir)/cola
86 $(RM_R
) $(DESTDIR
)$(coladir
)/git_cola
*
87 $(RM_R
) git_cola.egg-info
90 # Maintainer's dist target
92 $(GIT
) archive
--format
=tar --prefix=$(cola_dist
)/ HEAD^
{tree
} | \
93 $(GZIP
) -f
-9 - >$(cola_dist
).
tar.gz
97 $(MAKE
) -C share
/doc
/git-cola
all
101 $(MAKE
) -C share
/doc
/git-cola html
105 $(MAKE
) -C share
/doc
/git-cola man
109 $(MAKE
) -C share
/doc
/git-cola
install
113 $(MAKE
) -C share
/doc
/git-cola install-html
117 $(MAKE
) -C share
/doc
/git-cola install-man
121 $(RM
) $(DESTDIR
)$(prefix)/bin
/git-cola
122 $(RM
) $(DESTDIR
)$(prefix)/bin
/git-dag
123 $(RM
) $(DESTDIR
)$(prefix)/bin
/cola
124 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-cola.desktop
125 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-cola-folder-handler.desktop
126 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-dag.desktop
127 $(RM
) $(DESTDIR
)$(prefix)/share
/icons
/hicolor
/scalable
/apps
/git-cola.svg
128 $(RM_R
) $(DESTDIR
)$(prefix)/share
/git-cola
129 $(RM_R
) $(DESTDIR
)$(prefix)/share
/doc
/git-cola
130 $(RM
) $(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
/git-cola.mo
131 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
2>/dev
/null
132 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
/* 2>/dev
/null
133 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
2>/dev
/null
134 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/doc
2>/dev
/null
135 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/applications
2>/dev
/null
136 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
2>/dev
/null
137 -$(RMDIR
) $(DESTDIR
)$(prefix)/bin
2>/dev
/null
138 -$(RMDIR
) $(DESTDIR
)$(prefix) 2>/dev
/null
142 $(NOSE
) $(PYTHON_DIRS
)
146 $(NOSE
) --with-coverage
--cover-package
=cola
$(PYTHON_DIRS
)
150 $(FIND
) $(ALL_PYTHON_DIRS
) -name
'*.py[cod]' -print0 | xargs
-0 rm -f
151 $(RM_R
) build
dist tags git-cola.app
153 $(MAKE
) -C share
/doc
/git-cola
clean
157 $(FIND
) $(ALL_PYTHON_DIRS
) -name
'*.py' -print0 | xargs
-0 $(CTAGS
) -f
tags
161 $(SETUP
) build_pot
-N
-d po
169 $(MKDIR_P
) $(cola_app
)/Contents
/MacOS
170 $(MKDIR_P
) $(cola_app
)/Contents
/Resources
171 $(CP
) contrib
/darwin
/Info.plist contrib
/darwin
/PkgInfo
$(cola_app
)/Contents
172 $(CP
) contrib
/darwin
/git-cola
$(cola_app
)/Contents
/MacOS
173 $(CP
) contrib
/darwin
/git-cola.icns
$(cola_app
)/Contents
/Resources
174 $(MAKE
) prefix=$(cola_app
)/Contents
/Resources
install install-doc
175 $(LN_S
) $(darwin_python
) $(cola_app
)/Contents
/Resources
/git-cola
178 app-tarball
: git-cola.app
179 $(TAR
) czf
$(cola_dist
).app.
tar.gz
$(cola_app_base
)
182 # Preview the markdown using "make README.html"
187 $(FLAKE8
) $(FLAKE8_FLAGS
) $(PYTHON_SOURCES
) $(PYTHON_DIRS
)
191 $(PYLINT
) $(PYLINT_FLAGS
) $(PYTHON_SOURCES
) $(ALL_PYTHON_DIRS
)
195 $(PIP
) install --requirement requirements.txt
196 $(PIP
) install --requirement extras
/requirements-dev.txt