summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJasmin Jessich <jasmin@anw.at>2017-05-17 23:55:10 +0200
committerJasmin Jessich <jasmin@anw.at>2017-05-18 21:05:19 +0200
commit6ca093e163addc9e119544c43ebeadb819438291 (patch)
tree8666ef26118296493cd0febb02e7e96241e27320 /Makefile
parentd69aef07c4606e66b2b5c6bc4a2a115c43ec58c7 (diff)
downloadvdr-plugin-live-6ca093e163addc9e119544c43ebeadb819438291.tar.gz
vdr-plugin-live-6ca093e163addc9e119544c43ebeadb819438291.tar.bz2
Fixed defining I18Npot_deps
- Added a second make run, because make does evaluate "I18Npot_deps" only once, when it is invoked and at this time all the *.cpp files aren't created.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index f6291c6..657a1d2 100644
--- a/Makefile
+++ b/Makefile
@@ -114,14 +114,19 @@ I18Npo := $(wildcard $(PODIR)/*.po)
I18Nmo := $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs := $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot := $(PODIR)/$(PLUGIN).pot
-I18Npot_deps := $(PLUGINSRCS) $(wildcard $(WEB_DIR_PAGES)/*.cpp) setup.h epg_events.h
+I18Npot_deps = $(PLUGINSRCS) $(wildcard $(WEB_DIR_PAGES)/*.cpp) setup.h epg_events.h
+
+$(I18Npot): $(I18Npot_deps)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --omit-header -o $@ $(I18Npot_deps)
+
+# Need a recursive target here to get I18Npot_deps with the correct list of files (wildcard ...)
+.PHONY: make_I18Npot
+make_I18Npot:
+ $(MAKE) $(I18Npot)
%.mo: %.po
msgfmt -c -o $@ $<
-$(I18Npot): $(I18Npot_deps)
- xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --omit-header -o $@ $^
-
%.po: $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
@touch $@
@@ -130,10 +135,10 @@ $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
install -D -m644 $< $@
.PHONY: i18n
-i18n: $(I18Nmo) $(I18Npot)
+i18n: subdirs make_I18Npot $(I18Nmo)
.PHONY: install-i18n
-install-i18n: $(I18Nmsgs)
+install-i18n: i18n $(I18Nmsgs)
### Targets: