diff options
| author | Daniel Meyerholt <dxm523@googlemail.com> | 2014-06-21 16:44:00 +0200 |
|---|---|---|
| committer | Daniel Meyerholt <dxm523@googlemail.com> | 2014-06-21 16:44:00 +0200 |
| commit | 1e92006a691e98a5fd712d1180d160c49200e041 (patch) | |
| tree | a7d067f3c1af227bea8acafed3fece5f9c6337d8 /Makefile | |
| parent | dd9e8516cc1d9c816b85b97ce5af60c7cc6450c3 (diff) | |
| download | vdr-plugin-vdrrip-1e92006a691e98a5fd712d1180d160c49200e041.tar.gz vdr-plugin-vdrrip-1e92006a691e98a5fd712d1180d160c49200e041.tar.bz2 | |
- Stole i18n Patch from e-tobi's deb-package
- Make gcc happy by using (char *) casts and inserting some paranthesis
Diffstat (limited to 'Makefile')
| -rwxr-xr-x | Makefile | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -55,7 +55,7 @@ endif ### The object files (add further files here): OBJS = $(PLUGIN).o \ - menu-vdrrip.o movie.o templates.o codecs.o queue.o vdrriprecordings.o a-tools.o i18n.o + menu-vdrrip.o movie.o templates.o codecs.o queue.o vdrriprecordings.o a-tools.o ifdef VDRRIP_DVD DEFINES += -DVDRRIP_DVD @@ -76,9 +76,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='<tobias.grimm@e-tobi.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) -shared $(OBJS) $(LIBS) -o $@ @@ -93,4 +118,5 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ |
