diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-28 20:23:10 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-28 20:23:10 -0700 |
commit | c63a3ad2c1d6f86cd7989055a133e06055239317 (patch) | |
tree | 6f7a8d02c0f5677b9d79d14f7a59655fc4400eab /git-gui/Makefile | |
parent | Makefile: Remove git-fsck and git-verify-pack from PROGRAMS (diff) | |
parent | git-gui: Guess our share/git-gui/lib path at runtime if possible (diff) | |
download | tgif-c63a3ad2c1d6f86cd7989055a133e06055239317.tar.xz |
Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui:
git-gui: Guess our share/git-gui/lib path at runtime if possible
Correct key bindings to Control-<foo>
git-gui: Tighten internal pattern match for lib/ directory
Diffstat (limited to 'git-gui/Makefile')
-rw-r--r-- | git-gui/Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/git-gui/Makefile b/git-gui/Makefile index ee564219c0..3de0de1a23 100644 --- a/git-gui/Makefile +++ b/git-gui/Makefile @@ -22,7 +22,7 @@ ifndef gitexecdir endif ifndef sharedir - sharedir := $(dir $(gitexecdir))/share + sharedir := $(dir $(gitexecdir))share endif ifndef INSTALL @@ -53,12 +53,19 @@ TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH)) libdir ?= $(sharedir)/git-gui/lib libdir_SQ = $(subst ','\'',$(libdir)) +exedir = $(dir $(gitexecdir))share/git-gui/lib +exedir_SQ = $(subst ','\'',$(exedir)) + $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh $(QUIET_GEN)rm -f $@ $@+ && \ + if test '$(exedir_SQ)' = '$(libdir_SQ)'; then \ + GITGUI_RELATIVE=1; \ + fi && \ 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)|' \ + -e 's|@@GITGUI_RELATIVE@@|'$$GITGUI_RELATIVE'|' \ + -e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \ $@.sh >$@+ && \ chmod +x $@+ && \ mv $@+ $@ @@ -88,6 +95,7 @@ TRACK_VARS = \ $(subst ','\'',SHELL_PATH='$(SHELL_PATH_SQ)') \ $(subst ','\'',TCL_PATH='$(TCL_PATH_SQ)') \ $(subst ','\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \ + $(subst ','\'',gitexecdir='$(gitexecdir_SQ)') \ $(subst ','\'',libdir='$(libdir_SQ)') \ #end TRACK_VARS |