summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-08-19 22:25:44 +0000
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-08-19 22:25:44 +0000
commit9fbd094f87bd05d73292999715b19ff3449e724c (patch)
tree32ab93d487df175495803b87dd26205c4a3c95d5 /Makefile
parent323f68b9221a7b6d97a55724ac531f254e4f1b1c (diff)
downloadvdr-plugin-live-9fbd094f87bd05d73292999715b19ff3449e724c.tar.gz
vdr-plugin-live-9fbd094f87bd05d73292999715b19ff3449e724c.tar.bz2
- Made translation of the locale files only when needed by VDR version.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 902431f..f2ccee6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile,v 1.44 2007/08/19 19:48:54 tadi Exp $
+# $Id: Makefile,v 1.45 2007/08/19 22:25:44 tadi Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -42,6 +42,7 @@ LOCDIR ?= $(VDRDIR)
### The version number of VDR's plugin API (taken from VDR's "config.h"):
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+I18NTARG = $(shell if [ `echo $(APIVERSION) | tr [.] [0]` -ge "10507" ]; then echo "i18n"; fi)
### The name of the distribution archive:
@@ -72,7 +73,7 @@ WEBLIBS = pages/libpages.a css/libcss.a images/libimages.a \
.PHONY: all dist clean SUBDIRS
-all: libvdr-$(PLUGIN).so i18n
+all: libvdr-$(PLUGIN).so $(I18NTARG)
### Implicit rules:
@@ -104,8 +105,8 @@ endif
%.mo: %.po
msgfmt -c -o $@ $<
-$(I18Npot): $(wildcard *.cpp) $(wildcard pages/*.cpp)
- xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<cwieninger@gmx.de>' -o $@ *.cpp pages/*.cpp
+$(I18Npot): PAGES $(PLUGINOBJS:%.o=%.cpp)
+ xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<cwieninger@gmx.de>' -o $@ $(PLUGINOBJS:%.o=%.cpp) pages/*.cpp
$(I18Npo): $(I18Npot)
msgmerge -U --no-wrap -F --backup=none -q $@ $<
@@ -117,7 +118,7 @@ i18n: $(I18Nmo)
cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(I18Nvdrmo);\
done
-i18n-generated.h: SUBDIRS i18n-template.h $(I18Npot) $(I18Npo) buildutil/pot2i18n.pl
+i18n-generated.h: i18n-template.h $(I18Npot) $(I18Npo) buildutil/pot2i18n.pl
buildutil/pot2i18n.pl $(I18Npot) i18n-template.h > $@
### Targets:
@@ -127,6 +128,9 @@ SUBDIRS:
make -C $$dir CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" || exit 1; \
done
+PAGES:
+ make -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" .dependencies || exit 1;
+
libvdr-$(PLUGIN).so: SUBDIRS $(PLUGINOBJS)
$(CXX) $(LDFLAGS) -shared -o $@ $(PLUGINOBJS) -Wl,--whole-archive $(WEBLIBS) -Wl,--no-whole-archive $(LIBS)
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)