Skip to content

Commit

Permalink
git-gui: Honor TCLTK_PATH if supplied
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano authored and Shawn O. Pearce committed Apr 17, 2007
1 parent 69dd97a commit 845d377
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 $@+ && \
Expand Down

0 comments on commit 845d377

Please sign in to comment.