From: Shawn O. Pearce Date: Sun, 9 Sep 2007 09:03:56 +0000 (-0400) Subject: Merge branch 'maint' X-Git-Tag: gitgui-0.9.0~81 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2bd31006f02debe1ddf4fa8b73c52281516a871;p=git.git Merge branch 'maint' * maint: git-gui: Avoid use of libdir in Makefile git-gui: Disable Tk send in all git-gui sessions git-gui: lib/index.tcl: handle files with % in the filename properly --- b2bd31006f02debe1ddf4fa8b73c52281516a871 diff --cc Makefile index df6f6b727,f11cf2676..5b1ff9149 --- a/Makefile +++ b/Makefile @@@ -105,21 -103,6 +105,21 @@@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : % $(GITGUI_BUILT_INS): git-gui $(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@ +XGETTEXT ?= xgettext +MSGFMT ?= msgfmt - msgsdir ?= $(libdir)/msgs ++msgsdir = $(gg_libdir)/msgs +msgsdir_SQ = $(subst ','\'',$(msgsdir)) +PO_TEMPLATE = po/git-gui.pot +ALL_POFILES = $(wildcard po/*.po) +ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES)) + +$(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES) + $(XGETTEXT) -kmc -LTcl -o $@ $(SCRIPT_SH) $(ALL_LIBFILES) +update-po:: $(PO_TEMPLATE) + $(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; ) +$(ALL_MSGFILES): %.msg : %.po + $(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@) $(QUIET_MSGFMT1) + lib/tclIndex: $(ALL_LIBFILES) $(QUIET_INDEX)if echo \ $(foreach p,$(PRELOAD_FILES),source $p\;) \ diff --cc git-gui.sh index b3d447e59,6d676097a..daab7e44b --- a/git-gui.sh +++ b/git-gui.sh @@@ -42,24 -42,8 +42,26 @@@ if {[catch {package require Tcl 8.4} er exit 1 } + rename send {} ; # What an evil concept... + +###################################################################### +## +## locate our library + +set oguilib {@@GITGUI_LIBDIR@@} +set oguirel {@@GITGUI_RELATIVE@@} +if {$oguirel eq {1}} { + set oguilib [file dirname [file dirname [file normalize $argv0]]] + set oguilib [file join $oguilib share git-gui lib] + set oguimsg [file join $oguilib msgs] +} elseif {[string match @@* $oguirel]} { + set oguilib [file join [file dirname [file normalize $argv0]] lib] + set oguimsg [file join [file dirname [file normalize $argv0]] po] +} else { + set oguimsg [file join $oguilib msgs] +} +unset oguirel + ###################################################################### ## ## enable verbose loading?