@matheusbsbs / matheus-bagliano / commits / 845d377b28
Fork 0

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>

Junio C Hamano committed Apr 17, 2007 at 03:31 UTC 845d377b2880a0c5d74f785244469ab1ac815bde
1 file changed +4
Makefile
+4
@@ -28,6 +28,8 @@ ifndef V
28 QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
29 endif
30
31 +TCLTK_PATH ?= wish
32 +
33 ifeq ($(findstring $(MAKEFLAGS),s),s)
34 QUIET_GEN =
35 QUIET_BUILT_IN =
@@ -36,10 +38,12 @@ endif
38 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
39 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
40 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
41 +TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
42
43 $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
44 $(QUIET_GEN)rm -f $@ $@+ && \
45 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
46 + -e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
47 -e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
48 $@.sh >$@+ && \
49 chmod +x $@+ && \