diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -65,7 +65,7 @@ endif ### The object files (add further files here): -OBJS = $(PLUGIN).o activity.o i18n.o +OBJS = $(PLUGIN).o activity.o ### Libraries @@ -78,9 +78,6 @@ endif %.o: %.c $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< -i18n.c: i18n-template.c po2i18n.pl - ./po2i18n.pl < i18n-template.c > i18n.c - # Dependencies: MAKEDEP = $(CXX) -MM -MG @@ -95,25 +92,25 @@ $(DEPFILE): Makefile i18n.c 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 %.mo: %.po msgfmt -c -o $@ $< $(I18Npot): $(wildcard *.c) - xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<timo@tolleri.net>' -o $@ $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<timo@tolleri.net>' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ -$(I18Npo): $(I18Npot) - msgmerge -U --no-wrap -F --backup=none -q $@ $< +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir \$@) + cp $< $@ -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-$(PLUGIN).mo;\ - done +.PHONY: i18n +i18n: $(I18Nmsgs) $(I18Npot) ### Targets: |