git-gui: Created makefile to install the program.
Since we want to be installed in gitexecdir so that "git gui" works we can guess where that directory is by asking the git wrapper executable and locating ourselves at the same location using the same install rules as core git. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Nov 15, 2006 at 20:04 UTC
b3678bacbcd2dc0e1c61fd91f4146d0c037e626f
1 file changed
+14
Makefile
new
+14
@@ -0,0 +1,14 @@
1
+all: git-gui
2
+
3
+gitexecdir := $(shell git --exec-path)
4
+INSTALL = install
5
+
6
+DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
7
+gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
8
+
9
+GITGUI_BUILTIN = git-citool
10
+
11
+install: all
12
+ $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
13
+ $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
14
+ $(foreach p,$(GITGUI_BUILTIN), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)