]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: Created makefile to install the program.
authorShawn O. Pearce <spearce@spearce.org>
Thu, 16 Nov 2006 01:04:17 +0000 (20:04 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 18 Nov 2006 04:56:14 +0000 (23:56 -0500)
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>
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..e3e871f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+all: git-gui
+
+gitexecdir := $(shell git --exec-path)
+INSTALL = install
+
+DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
+
+GITGUI_BUILTIN = git-citool
+
+install: all
+       $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+       $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+       $(foreach p,$(GITGUI_BUILTIN), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)