{"thread":{"id":"8182","subject":"[PATCH] git-gui: Build even if tclsh is not available","startedAt":"2007-05-17T02:04:55Z","lastAt":"2007-05-17T02:04:55Z","messageCount":1,"participants":["Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"42354","messageId":"20070517020455.685.6755.stgit@rover","threadId":"8182","inReplyTo":null,"subject":"[PATCH] git-gui: Build even if tclsh is not available","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2007-05-17T02:04:55Z","receivedAt":"2007-05-17T02:04:55Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"As of now, git fails to build with default config if tclsh is not\navailable, thus requiring manual config tweaking just because of some\noptimizations done at build time; this is a needless hassle when building\ngit on any kind of a server.\n\nThis patch makes git-gui's build process to handle this gracefully; unless\nTCL_PATH is explicitly set, if tclsh cannot be executed only a warning is\nprinted and the build goes on. I have tested this only on that server with\nno tclsh, but hopefully it shouldn't break the build process with tclsh\navailable either.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n Makefile         |    8 +++++---\n git-gui/Makefile |    2 +-\n 2 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 07411ff..ed12577 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -178,10 +178,12 @@ AR = ar\n TAR = tar\n INSTALL = install\n RPMBUILD = rpmbuild\n-TCL_PATH = tclsh\n-TCLTK_PATH = wish\n \n-export TCL_PATH TCLTK_PATH\n+# If TCL_PATH is not defined here, it will default to tclsh later\n+# with the exception that if tclsh cannot be executed, the optimization\n+# step is skipped.\n+# export TCL_PATH = tclsh\n+export TCLTK_PATH = wish\n \n # sparse is architecture-neutral, which means that we need to tell it\n # explicitly what architecture to check for. Fix this up for yours..\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex e73b645..2b1bc18 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -34,7 +34,7 @@ ifndef V\n \tQUIET_INDEX    = @echo '   ' INDEX $(dir $@);\n endif\n \n-TCL_PATH   ?= tclsh\n+TCL_PATH   ?= tclsh || echo \"Warning: Cannot execute tclsh, not optimizing git-gui\" >&2\n TCLTK_PATH ?= wish\n \n ifeq ($(findstring $(MAKEFLAGS),s),s)\n"}]}