aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-17 03:31:47 -0700
committerShawn O. Pearce <spearce@spearce.org>2007-04-17 13:16:14 -0400
commit845d377b2880a0c5d74f785244469ab1ac815bde (patch)
tree59d29a1d751fdfdef80806a959954f3605726f72 /Makefile
parent69dd97a430d3deebbcade1d38c53110342440890 (diff)
downloadgit-845d377b2880a0c5d74f785244469ab1ac815bde.tar.gz
git-845d377b2880a0c5d74f785244469ab1ac815bde.tar.xz
git-gui: Honor TCLTK_PATH if supplied
Mimick what we do for gitk. Since you do have a source file, git-gui.sh, which is separate from the target, it should be much easier in git-gui's Makefile. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b82789ead..b29d7d1e6 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,8 @@ ifndef V
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
endif
+TCLTK_PATH ?= wish
+
ifeq ($(findstring $(MAKEFLAGS),s),s)
QUIET_GEN =
QUIET_BUILT_IN =
@@ -36,10 +38,12 @@ endif
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
+TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)rm -f $@ $@+ && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+ -e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
$@.sh >$@+ && \
chmod +x $@+ && \