@matheusbsbs / matheus-bagliano / commits / e2a1bc67d3
Fork 0

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 <rea-git@codelabs.ru> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Eygene Ryabinkin committed Apr 4, 2007 at 11:31 UTC e2a1bc67d321a0c03737179f331c39a52e7049d7
1 file changed +3
Makefile
+3
@@ -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 =
@@ -55,6 +57,7 @@ all:: $(ALL_PROGRAMS)
57
58 install: all
59 $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
60 + sed -i .bak -e'1,3s|^exec .* "$$0"|exec '"$(TCLTK_PATH)"' "$$0"|' git-gui && rm git-gui.bak
61 $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
62 $(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
63