summaryrefslogtreecommitdiff
path: root/Makefile
blob: e3e871f7c4e84d81f4280d40a46c549fa56749e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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' ;)