Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-05-08 07:36:31 +0400
committerShawn O. Pearce <spearce@spearce.org>2007-05-08 07:51:00 +0400
commit5f5dbd719d0d8ec136f32a0a56674902bd85f72f (patch)
treef5898a282daf34722256709c7ac2ac7f78f9bbb7 /git-gui/Makefile
parent3082acfa7c626a34aa419a163585051c2df2bf09 (diff)
parentebcaadabcb90eaf35a3bd69a50cccce4be4dcc2c (diff)
Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui: git-gui: Use vi-like keys in merge dialog git-gui: Include commit id/subject in merge choices git-gui: Show all possible branches for merge git-gui: Move merge support into a namespace git-gui: Allow vi keys to scroll the diff/blame regions git-gui: Move console procs into their own namespace git-gui: Refactor into multiple files to save my sanity git-gui: Track our own embedded values and rebuild when they change git-gui: Refactor to use our git proc more often git-gui: Use option database defaults to set the font git-gui: Cleanup common font handling for font_ui git-gui: Correct line wrapping for too many branch message git-gui: Warn users before making an octopus merge git-gui: Include the subject in the status bar after commit Also perform an evil merge change to update Git's main Makefile to pass the proper options down into git-gui now that it depends on reasonable values for 'sharedir' and 'TCL_PATH'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui/Makefile')
-rw-r--r--git-gui/Makefile38
1 files changed, 35 insertions, 3 deletions
diff --git a/git-gui/Makefile b/git-gui/Makefile
index b29d7d1e68..ba1e33ba84 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -10,6 +10,7 @@ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
SCRIPT_SH = git-gui.sh
GITGUI_BUILT_INS = git-citool
ALL_PROGRAMS = $(GITGUI_BUILT_INS) $(patsubst %.sh,%,$(SCRIPT_SH))
+ALL_LIBFILES = $(wildcard lib/*.tcl)
ifndef SHELL_PATH
SHELL_PATH = /bin/sh
@@ -19,6 +20,10 @@ ifndef gitexecdir
gitexecdir := $(shell git --exec-path)
endif
+ifndef sharedir
+ sharedir := $(dir $(gitexecdir))/share
+endif
+
ifndef INSTALL
INSTALL = install
endif
@@ -26,8 +31,10 @@ endif
ifndef V
QUIET_GEN = @echo ' ' GEN $@;
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
+ QUIET_INDEX = @echo ' ' INDEX $(dir $@);
endif
+TCL_PATH ?= tclsh
TCLTK_PATH ?= wish
ifeq ($(findstring $(MAKEFLAGS),s),s)
@@ -40,11 +47,15 @@ gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
+libdir ?= $(sharedir)/git-gui/lib
+libdir_SQ = $(subst ','\'',$(libdir))
+
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)rm -f $@ $@+ && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
+ -e 's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \
$@.sh >$@+ && \
chmod +x $@+ && \
mv $@+ $@
@@ -52,22 +63,43 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(GITGUI_BUILT_INS): git-gui
$(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@
+lib/tclIndex: $(ALL_LIBFILES)
+ $(QUIET_INDEX)echo auto_mkindex lib '*.tcl' | $(TCL_PATH)
+
# These can record GITGUI_VERSION
-$(patsubst %.sh,%,$(SCRIPT_SH)): GIT-VERSION-FILE
+$(patsubst %.sh,%,$(SCRIPT_SH)): GIT-VERSION-FILE GIT-GUI-VARS
+
+TRACK_VARS = \
+ $(subst ','\'',SHELL_PATH='$(SHELL_PATH_SQ)') \
+ $(subst ','\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \
+ $(subst ','\'',libdir='$(libdir_SQ)') \
+#end TRACK_VARS
+
+GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
+ @VARS='$(TRACK_VARS)'; \
+ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
+ echo 1>&2 " * new locations or Tcl/Tk interpreter"; \
+ echo 1>$@ "$$VARS"; \
+ fi
-all:: $(ALL_PROGRAMS)
+all:: $(ALL_PROGRAMS) lib/tclIndex
install: all
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(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' ;)
+ $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(libdir_SQ)'
+ $(INSTALL) -m644 lib/tclIndex '$(DESTDIR_SQ)$(libdir_SQ)'
+ $(foreach p,$(ALL_LIBFILES), $(INSTALL) -m644 $p '$(DESTDIR_SQ)$(libdir_SQ)' ;)
dist-version:
@mkdir -p $(TARDIR)
@echo $(GITGUI_VERSION) > $(TARDIR)/version
clean::
- rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE
+ rm -f $(ALL_PROGRAMS) lib/tclIndex
+ rm -f GIT-VERSION-FILE GIT-GUI-VARS
.PHONY: all install dist-version clean
.PHONY: .FORCE-GIT-VERSION-FILE
+.PHONY: .FORCE-GIT-GUI-VARS