Hi,
I dislike that current vdr remakes/copies the language file
everytime even nothing has changed.
The attached patch implements a (may be) more sophisticated way.

Regards.

-- 
Stefan Huelswitt
[EMAIL PROTECTED]  | http://www.muempf.de/
--- vdr-1.5.9-orig/Makefile     2007-08-25 10:52:17.000000000 +0200
+++ vdr-1.5.9/Makefile  2007-08-27 14:40:07.000000000 +0200
@@ -76,6 +76,7 @@
 endif
 
 all: vdr i18n
+.PHONY: i18n
 
 # Implicit rules:
 
@@ -106,25 +107,24 @@
 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, $(wildcard $(PODIR)/*.po), $(basename $(file))))))
 I18Npot   = $(PODIR)/vdr.pot
 
 %.mo: %.po
        msgfmt -c -o $@ $<
 
-$(I18Npot): $(wildcard *.c)
-       xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP 
--msgid-bugs-address='<[EMAIL PROTECTED]>' -o $@ $(wildcard *.c)
+$(I18Npot): $(shell grep -l '\(tr\|trNOOP\)(\".*\")' *.c)
+       xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP 
--msgid-bugs-address='<[EMAIL PROTECTED]>' -o $@ $^
 
-$(I18Npo): $(I18Npot)
+%.po: $(I18Npot)
        msgmerge -U --no-wrap -F --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 $< $@
+
+i18n: $(I18Nmsgs)
 
 install-i18n:
        @mkdir -p $(DESTDIR)$(LOCDIR)
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to