diff options
| author | monty35 <videosrc@vdr.muc.bieringer.de> | 2008-12-20 09:24:51 +0100 |
|---|---|---|
| committer | monty35 <videosrc@vdr.muc.bieringer.de> | 2008-12-20 09:24:51 +0100 |
| commit | 3308e0c0b652a77466cdeb9c2ce3e771c87fd818 (patch) | |
| tree | 927800d9ecfddc6b0d58aea350528706845737f1 /Makefile | |
| parent | dabdbe5409bacc56e22461a6a1ff9b736381b158 (diff) | |
| download | vdr-plugin-tvtv-3308e0c0b652a77466cdeb9c2ce3e771c87fd818.tar.gz vdr-plugin-tvtv-3308e0c0b652a77466cdeb9c2ce3e771c87fd818.tar.bz2 | |
Import patch to 0.3.3p8
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -54,7 +54,7 @@ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### The object files (add further files here): -OBJS = $(PLUGIN).o i18n.o config.o update.o md5tools.o channelmap.o +OBJS = $(PLUGIN).o config.o update.o md5tools.o channelmap.o ### Implicit rules: @@ -70,9 +70,43 @@ $(DEPFILE): Makefile -include $(DEPFILE) +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(wildcard $(PODIR)/*.po) +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 --no-location -k -ktr -ktrNOOP --msgid-bugs-address='monty35' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ + +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ + +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) $(I18Npot) + ### Targets: -all: libvdr-$(PLUGIN).so +all: libvdr-$(PLUGIN).so i18n libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ |
