From bde204f3b33fdc1b86e26aef1be47fa343b50f02 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 4 Nov 2007 14:13:11 +0000 Subject: [PATCH] Updated Makefile 'i18n' targets. --- HISTORY | 1 + Makefile | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/HISTORY b/HISTORY index 464c02b..a4734b5 100644 --- a/HISTORY +++ b/HISTORY @@ -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. diff --git a/Makefile b/Makefile index 963825b..bce21ce 100644 --- a/Makefile +++ b/Makefile @@ -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