git-gui: Default TCL_PATH to same location as TCLTK_PATH
[gitweb.git] / Makefile
index 081d7550a7dbc91d8360822a4da3ca51c66a33a2..1ba0e788f9a99980b4ab3a35f213f0a4ffcbaa1e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -92,8 +92,12 @@ ifndef V
        REMOVE_F1 = && echo '   ' REMOVE `basename "$$dst"` && $(RM_RF) "$$dst"
 endif
 
-TCL_PATH   ?= tclsh
 TCLTK_PATH ?= wish
+ifeq (./,$(dir $(TCLTK_PATH)))
+       TCL_PATH ?= $(subst wish,tclsh,$(TCLTK_PATH))
+else
+       TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
+endif
 
 ifeq ($(uname_S),Darwin)
        TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app