Updated Makefile 'i18n' targets.

This commit is contained in:
Rolf Ahrenberg 2007-11-04 14:13:11 +00:00
parent 60ed46f42f
commit bde204f3b3
2 changed files with 13 additions and 12 deletions

View File

@ -23,3 +23,4 @@ VDR Plugin 'iptv' Revision History
- Added German translation (Thanks to Tobias Grimm)
- Added pluginparam patch for vdr-1.5.11.
- Updated Makefile 'i18n' targets.

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile,v 1.22 2007/10/28 16:26:28 rahrenbe Exp $
# $Id: Makefile,v 1.23 2007/11/04 14:13:11 rahrenbe Exp $
# Debugging on/off
#IPTV_DEBUG = 1
@ -87,8 +87,7 @@ $(DEPFILE): Makefile
PODIR = po
LOCALEDIR = $(VDRDIR)/locale
I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot
ifeq ($(strip $(APIVERSION)),1.5.7)
I18Nvdrmo = $(PLUGIN).mo
@ -103,18 +102,19 @@ ifneq ($(strip $(VDRLOCALE)),)
%.mo: %.po
msgfmt -c -o $@ $<
$(I18Npot): $(wildcard *.c)
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='Rolf Ahrenberg' -o $@ $(subst i18n.c,,$(wildcard *.c))
$(I18Npot): $(subst i18n.c,,$(wildcard *.c))
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='Rolf Ahrenberg' -o $@ $^
$(I18Npo): $(I18Npot)
%.po: $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
@touch $@
i18n: $(I18Npot) $(I18Nmo)
@mkdir -p $(LOCALEDIR)
for i in $(I18Ndirs); do\
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(I18Nvdrmo);\
done
$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
@mkdir -p $(dir $@)
cp $< $@
.PHONY: i18n
i18n: $(I18Nmsgs)
i18n.c: i18n-template.c
@cp i18n-template.c i18n.c