From: Eygene Ryabinkin Date: Wed, 4 Apr 2007 15:31:49 +0000 (-0400) Subject: Allow wish interpreter to be defined with TCLTK_PATH X-Git-Tag: v1.5.2-rc0~38^2~3^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e2a1bc67d321a0c03737179f331c39a52e7049d7;p=git.git Allow wish interpreter to be defined with TCLTK_PATH Makefile got one external option: - TCLTK_PATH: the path to the Tcl/Tk interpreter. Users (or build wrappers) may set this variable to the location of the wish executable. Signed-off-by: Eygene Ryabinkin Signed-off-by: Shawn O. Pearce --- diff --git a/Makefile b/Makefile index b82789ead..2316b24e0 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 = @@ -55,6 +57,7 @@ all:: $(ALL_PROGRAMS) install: all $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)' + sed -i .bak -e'1,3s|^exec .* "$$0"|exec '"$(TCLTK_PATH)"' "$$0"|' git-gui && rm git-gui.bak $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)' $(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)