aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..e3e871f7c
--- /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' ;)