summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 8 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index d37731e..9ded975 100644
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,13 @@ endif
# 1:source 2:locales
define SOURCE_template
-$(1): $$($(1)_MODULES) $(foreach module,$$($(1)_MODULES),$(foreach locale,$(2),$(module)_l10n/$(locale))) $(dummy_MODULES)
-L10N_MODULES += $$(foreach locale,$(2),$(1)_l10n/$$(locale))
+$(1): $$($(1)_MODULES) $(dummy_MODULES)
+
+.PHONY: $(1)
endef
-#$(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_LOCALES))))
+$(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_LOCALES))))
+
+
# 1:moduledir 2:locale 3:mastermodule 4:source
define MODULE_template
@@ -95,7 +98,7 @@ LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES))
$(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES))
$(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES))
-$(podir)/$(3).$(2).po: $(1) $(3)
+$(podir)/$(3).$(2).po: $(3) $(5)
( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \
| grep -v '#, fuzzy' \
> $$@
@@ -104,8 +107,6 @@ $(podir)/$(3).$(2).po: $(1) $(3)
$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po
mkdir -p $(1)
cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@
-
-.PHONY: $(1)
endef
$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module)))))))
@@ -124,8 +125,6 @@ $(podir)/$(3).$(2).po: $(3)
$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po
mkdir -p $(1)
cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@
-
-.PHONY: $(1)
endef
$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source))))))
@@ -160,7 +159,7 @@ $(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config))))
pot: $(ALL_POTFILES)
po: $(ALL_POFILES)
$(LOCALE_L10NFILES): $(MASTER_L10NFILES)
-translations: $(LOCALE_L10NFILES)
+translations: po $(LOCALE_L10NFILES)