1 # The default target of this Makefile is...
4 # The external commands used by this Makefile are...
21 # These values can be overridden on the command-line or via config.mak
23 bindir = $(prefix)/bin
24 datadir = $(prefix)/share
/git-cola
25 coladir
= $(datadir)/lib
26 hicolordir
= $(prefix)/share
/icons
/hicolor
/scalable
/apps
27 darwin_python
= /System
/Library
/Frameworks
/Python.framework
/Resources
/Python.app
/Contents
/MacOS
/Python
31 cola_app_base
= $(cola_base
).app
32 cola_app
= $(CURDIR
)/$(cola_app_base
)
33 cola_version
= $(shell $(PYTHON
) bin
/git-cola version
--brief
)
34 cola_dist
:= $(cola_base
)-$(cola_version
)
36 # Allows e.g. "make test flags=--stop"
38 NOSE ?
= $(NOSETESTS
) --with-doctest
--exclude
=sphinxtogithub
$(flags
)
40 SETUP ?
= $(PYTHON
) setup.py
41 setup_args
+= --prefix=$(prefix)
44 setup_args
+= --install-scripts
=$(bindir)
45 setup_args
+= --record
=build
/MANIFEST
46 setup_args
+= --install-lib
=$(coladir
)
48 setup_args
+= --root
=$(DESTDIR
)
67 $(SETUP
) install $(setup_args
)
68 $(MKDIR_P
) $(DESTDIR
)$(hicolordir
)
69 $(LN_S
) $(datadir)/icons
/git-cola.svg
$(DESTDIR
)$(hicolordir
)/git-cola.svg
70 $(LN_S
) git-cola
$(DESTDIR
)$(bindir)/cola
71 $(RM_R
) $(DESTDIR
)$(coladir
)/git_cola
*
72 $(RM_R
) git_cola.egg-info
75 # Maintainer's dist target
77 $(GIT
) archive
--format
=tar --prefix=$(cola_dist
)/ HEAD^
{tree
} | \
78 $(GZIP
) -f
-9 - >$(cola_dist
).
tar.gz
82 $(MAKE
) -C share
/doc
/git-cola
all
86 $(MAKE
) -C share
/doc
/git-cola html
90 $(MAKE
) -C share
/doc
/git-cola man
94 $(MAKE
) -C share
/doc
/git-cola
install
98 $(MAKE
) -C share
/doc
/git-cola install-html
102 $(MAKE
) -C share
/doc
/git-cola install-man
106 $(RM
) $(DESTDIR
)$(prefix)/bin
/git-cola
107 $(RM
) $(DESTDIR
)$(prefix)/bin
/git-dag
108 $(RM
) $(DESTDIR
)$(prefix)/bin
/cola
109 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-cola.desktop
110 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-cola-folder-handler.desktop
111 $(RM
) $(DESTDIR
)$(prefix)/share
/applications
/git-dag.desktop
112 $(RM
) $(DESTDIR
)$(prefix)/share
/icons
/hicolor
/scalable
/apps
/git-cola.svg
113 $(RM_R
) $(DESTDIR
)$(prefix)/share
/git-cola
114 $(RM_R
) $(DESTDIR
)$(prefix)/share
/doc
/git-cola
115 $(RM
) $(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
/git-cola.mo
116 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
/*/LC_MESSAGES
2>/dev
/null
117 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
/* 2>/dev
/null
118 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/locale
2>/dev
/null
119 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/doc
2>/dev
/null
120 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
/applications
2>/dev
/null
121 -$(RMDIR
) $(DESTDIR
)$(prefix)/share
2>/dev
/null
122 -$(RMDIR
) $(DESTDIR
)$(prefix)/bin
2>/dev
/null
123 -$(RMDIR
) $(DESTDIR
)$(prefix) 2>/dev
/null
127 $(NOSE
) $(PYTHON_DIRS
)
131 $(NOSE
) --with-coverage
--cover-package
=cola
$(PYTHON_DIRS
)
135 $(FIND
) $(PYTHON_DIRS
) -name
'*.py[cod]' -print0 | xargs
-0 rm -f
136 $(RM_R
) build
dist tags git-cola.app
138 $(MAKE
) -C share
/doc
/git-cola
clean
142 $(FIND
) $(PYTHON_DIRS
) -name
'*.py' -print0 | xargs
-0 $(CTAGS
) -f
tags
146 $(SETUP
) build_pot
-N
-d po
154 $(MKDIR_P
) $(cola_app
)/Contents
/MacOS
155 $(MKDIR_P
) $(cola_app
)/Contents
/Resources
156 $(CP
) contrib
/darwin
/Info.plist contrib
/darwin
/PkgInfo
$(cola_app
)/Contents
157 $(CP
) contrib
/darwin
/git-cola
$(cola_app
)/Contents
/MacOS
158 $(CP
) contrib
/darwin
/git-cola.icns
$(cola_app
)/Contents
/Resources
159 $(MAKE
) prefix=$(cola_app
)/Contents
/Resources
install install-doc
160 $(LN_S
) $(darwin_python
) $(cola_app
)/Contents
/Resources
/git-cola
163 app-tarball
: git-cola.app
164 $(TAR
) czf
$(cola_dist
).app.
tar.gz
$(cola_app_base
)
167 # Preview the markdown using "make README.html"