git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-gui: Build even if tclsh is not available
@ 2007-05-17  2:06 Petr Baudis
  2007-05-17  2:14 ` Petr Baudis
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Baudis @ 2007-05-17  2:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

As of now, git fails to build with default config if tclsh is not
available, thus requiring manual config tweaking just because of some
optimizations done at build time; this is a needless hassle when building
git on any kind of a server.

This patch makes git-gui's build process to handle this gracefully; unless
TCL_PATH is explicitly set, if tclsh cannot be executed only a warning is
printed and the build goes on. I have tested this only on that server with
no tclsh, but hopefully it shouldn't break the build process with tclsh
available either.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

 Makefile         |    8 +++++---
 git-gui/Makefile |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 07411ff..ed12577 100644
--- a/Makefile
+++ b/Makefile
@@ -178,10 +178,12 @@ AR = ar
 TAR = tar
 INSTALL = install
 RPMBUILD = rpmbuild
-TCL_PATH = tclsh
-TCLTK_PATH = wish
 
-export TCL_PATH TCLTK_PATH
+# If TCL_PATH is not defined here, it will default to tclsh later
+# with the exception that if tclsh cannot be executed, the optimization
+# step is skipped.
+# export TCL_PATH = tclsh
+export TCLTK_PATH = wish
 
 # sparse is architecture-neutral, which means that we need to tell it
 # explicitly what architecture to check for. Fix this up for yours..
diff --git a/git-gui/Makefile b/git-gui/Makefile
index e73b645..2b1bc18 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -34,7 +34,7 @@ ifndef V
 	QUIET_INDEX    = @echo '   ' INDEX $(dir $@);
 endif
 
-TCL_PATH   ?= tclsh
+TCL_PATH   ?= tclsh || echo "Warning: Cannot execute tclsh, not optimizing git-gui" >&2
 TCLTK_PATH ?= wish
 
 ifeq ($(findstring $(MAKEFLAGS),s),s)

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] git-gui: Build even if tclsh is not available
@ 2007-05-17  2:04 Petr Baudis
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Baudis @ 2007-05-17  2:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

As of now, git fails to build with default config if tclsh is not
available, thus requiring manual config tweaking just because of some
optimizations done at build time; this is a needless hassle when building
git on any kind of a server.

This patch makes git-gui's build process to handle this gracefully; unless
TCL_PATH is explicitly set, if tclsh cannot be executed only a warning is
printed and the build goes on. I have tested this only on that server with
no tclsh, but hopefully it shouldn't break the build process with tclsh
available either.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

 Makefile         |    8 +++++---
 git-gui/Makefile |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 07411ff..ed12577 100644
--- a/Makefile
+++ b/Makefile
@@ -178,10 +178,12 @@ AR = ar
 TAR = tar
 INSTALL = install
 RPMBUILD = rpmbuild
-TCL_PATH = tclsh
-TCLTK_PATH = wish
 
-export TCL_PATH TCLTK_PATH
+# If TCL_PATH is not defined here, it will default to tclsh later
+# with the exception that if tclsh cannot be executed, the optimization
+# step is skipped.
+# export TCL_PATH = tclsh
+export TCLTK_PATH = wish
 
 # sparse is architecture-neutral, which means that we need to tell it
 # explicitly what architecture to check for. Fix this up for yours..
diff --git a/git-gui/Makefile b/git-gui/Makefile
index e73b645..2b1bc18 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -34,7 +34,7 @@ ifndef V
 	QUIET_INDEX    = @echo '   ' INDEX $(dir $@);
 endif
 
-TCL_PATH   ?= tclsh
+TCL_PATH   ?= tclsh || echo "Warning: Cannot execute tclsh, not optimizing git-gui" >&2
 TCLTK_PATH ?= wish
 
 ifeq ($(findstring $(MAKEFLAGS),s),s)

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-17 22:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-17  2:06 [PATCH] git-gui: Build even if tclsh is not available Petr Baudis
2007-05-17  2:14 ` Petr Baudis
2007-05-17  2:18   ` Shawn O. Pearce
2007-05-17  2:36     ` Petr Baudis
2007-05-17  2:49       ` Shawn O. Pearce
2007-05-17 22:16       ` Shawn O. Pearce
  -- strict thread matches above, loose matches on Subject: below --
2007-05-17  2:04 Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).