git-gui: Display the full GPL copyright notice in about dialog.
[git/git.git] / Makefile
CommitLineData
41bdcda3
SP
1all::
2
3SCRIPT_SH = git-gui.sh
4GITGUI_BUILT_INS = git-citool
5ALL_PROGRAMS = $(GITGUI_BUILT_INS) $(patsubst %.sh,%,$(SCRIPT_SH))
6GITGUI_VERSION := $(shell git describe)
7
8ifndef SHELL_PATH
9 SHELL_PATH = /bin/sh
10endif
b3678bac
SP
11
12gitexecdir := $(shell git --exec-path)
13INSTALL = install
14
15DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
16gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
17
41bdcda3
SP
18SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
19
20$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
21 rm -f $@ $@+
22 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
23 -e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
24 $@.sh >$@+
25 chmod +x $@+
26 mv $@+ $@
27
28$(GITGUI_BUILT_INS): git-gui
29 rm -f $@ && ln git-gui $@
30
31all:: $(ALL_PROGRAMS)
b3678bac
SP
32
33install: all
34 $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
35 $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
41bdcda3
SP
36 $(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
37
38clean::
39 rm -f $(ALL_PROGRAMS)