Skip to content

Commit f85fd3f

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitk
* 'master' of git://git.kernel.org/pub/scm/gitk/gitk: [PATCH] gitk: use user-configured background in view definition dialog [PATCH] gitk: Update German translation [PATCH] gitk: Update and fix Makefile gitk: Restore some widget options whose defaults changed in Tk 8.5 gitk: Recode de.po to UTF-8 [PATCH] gitk i18n: Recode gitk from latin1 to utf8 so that the (c) copyright character is valid utf8. [PATCH] gitk i18n: More markup -- various options menus [PATCH] gitk i18n: Initial German translation [PATCH] gitk i18n: Markup several strings for translation [PATCH] gitk i18n: Import msgcat for message string translation; load translation catalogs [PATCH] gitk i18n: Add Makefile with rules for po file creation and installation
2 parents ef40b3e + f0c8426 commit f85fd3f

File tree

3 files changed

+1032
-295
lines changed

3 files changed

+1032
-295
lines changed

gitk-git/Makefile

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ all::
33

44
prefix ?= $(HOME)
55
bindir ?= $(prefix)/bin
6+
sharedir ?= $(prefix)/share
7+
gitk_libdir ?= $(sharedir)/gitk/lib
8+
msgsdir ?= $(gitk_libdir)/msgs
9+
msgsdir_SQ = $(subst ','\'',$(msgsdir))
10+
611
TCLTK_PATH ?= wish
712
INSTALL ?= install
813
RM ?= rm -f
@@ -11,19 +16,43 @@ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
1116
bindir_SQ = $(subst ','\'',$(bindir))
1217
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
1318

19+
## po-file creation rules
20+
XGETTEXT ?= xgettext
21+
MSGFMT ?= msgfmt
22+
PO_TEMPLATE = po/gitk.pot
23+
ALL_POFILES = $(wildcard po/*.po)
24+
ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
25+
1426
ifndef V
1527
QUIET = @
1628
QUIET_GEN = $(QUIET)echo ' ' GEN $@ &&
1729
endif
1830

19-
all:: gitk-wish
31+
all:: gitk-wish $(ALL_MSGFILES)
32+
2033
install:: all
2134
$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
35+
$(INSTALL) -d '$(DESTDIR_SQ)$(msgsdir_SQ)'
36+
$(foreach p,$(ALL_MSGFILES), $(INSTALL) $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
37+
38+
uninstall::
39+
$(foreach p,$(ALL_MSGFILES), $(RM) '$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) &&) true
40+
$(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
41+
2242
clean::
23-
$(RM) gitk-wish
43+
$(RM) gitk-wish po/*.msg
2444

2545
gitk-wish: gitk
2646
$(QUIET_GEN)$(RM) $@ $@+ && \
2747
sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
2848
chmod +x $@+ && \
2949
mv -f $@+ $@
50+
51+
$(PO_TEMPLATE): gitk
52+
$(XGETTEXT) -kmc -LTcl -o $@ gitk
53+
update-po:: $(PO_TEMPLATE)
54+
$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
55+
$(ALL_MSGFILES): %.msg : %.po
56+
@echo Generating catalog $@
57+
$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
58+

0 commit comments

Comments
 (0)