From 6ca093e163addc9e119544c43ebeadb819438291 Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Wed, 17 May 2017 23:55:10 +0200 Subject: 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. --- Makefile | 17 +++++++++++------ 1 file 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: -- cgit v1.2.3