diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-11-04 10:18:45 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-11-04 10:18:45 +0100 |
commit | 993235bdcc83a11f704e32d60b7dfe3f387eb036 (patch) | |
tree | 280079c1aa6ea75e06d3d87d1bccc14d10ffdefc /Makefile | |
parent | 612bbc0e066dd8823eea45c38db8583d76bb2e6a (diff) | |
download | vdr-993235bdcc83a11f704e32d60b7dfe3f387eb036.tar.gz vdr-993235bdcc83a11f704e32d60b7dfe3f387eb036.tar.bz2 |
Improved the 'i18n' target in the Makefile to avoid unnecessary work
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 1.109 2007/11/03 14:46:29 kls Exp $ +# $Id: Makefile 1.110 2007/11/04 10:15:59 kls Exp $ .DELETE_ON_ERROR: @@ -106,25 +106,25 @@ $(SILIB): PODIR = po LOCALEDIR = 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.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Npot = $(PODIR)/vdr.pot %.mo: %.po msgfmt -c -o $@ $< $(I18Npot): $(wildcard *.c) - xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<vdr-bugs@cadsoft.de>' -o $@ $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<vdr-bugs@cadsoft.de>' -o $@ $^ -$(I18Npo): $(I18Npot) +%.po: $(I18Npot) msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ -i18n: $(I18Nmo) - @mkdir -p $(LOCALEDIR) - for i in $(I18Ndirs); do\ - mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\ - cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/vdr.mo;\ - done +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr.mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) install-i18n: @mkdir -p $(DESTDIR)$(LOCDIR) |