diff options
| author | Martin Dummer <martin.dummer@gmx.net> | 2012-06-28 00:31:25 +0200 |
|---|---|---|
| committer | Martin Dummer <martin.dummer@gmx.net> | 2012-06-28 00:31:25 +0200 |
| commit | ef4637b0124e4bc804aced3092d13eba64b32693 (patch) | |
| tree | e0b2e2d9399f1f29dd53c98b60a2026b12e92116 /Makefile | |
| parent | ee2d383d09b40aef2213a7d7b1b6fd781c16ee6b (diff) | |
| download | vdr-plugin-undelete-ef4637b0124e4bc804aced3092d13eba64b32693.tar.gz vdr-plugin-undelete-ef4637b0124e4bc804aced3092d13eba64b32693.tar.bz2 | |
convert i18n handling to gettext
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -72,7 +72,7 @@ endif ### The object files (add further files here): -OBJS = $(PLUGIN).o i18n.o menuundelete.o menusetup.o vdrtools.o menueditkeys.o menudispkey.o +OBJS = $(PLUGIN).o menuundelete.o menusetup.o vdrtools.o menueditkeys.o menudispkey.o #FIXME ifeq ($(shell test $(VDRVERSNUM) -lt 10308 ; echo $$?),0) OBJS += menutext.o @@ -92,9 +92,34 @@ $(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='<martin.dummer@gmx.net>' -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 $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) + ### Targets: -all: libvdr-$(PLUGIN).so +all: libvdr-$(PLUGIN).so i18n libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @@ -109,4 +134,5 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ *.bak |
