aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-09-23 14:47:02 +0200
committerDavid Tardon <dtardon@redhat.com>2012-09-23 14:47:02 +0200
commit59266299e1c17d50fdf30f38c104811d4c6dc60e (patch)
tree3f803cecf37ea5ab247846d204151f3d0ff946bf
parentfd4f521a880aec5f183f02ed5f85277d78741e75 (diff)
use pattern rule
-rw-r--r--translations/CustomTarget_translate.mk16
1 files changed, 9 insertions, 7 deletions
diff --git a/translations/CustomTarget_translate.mk b/translations/CustomTarget_translate.mk
index 07fdf2deaa6..d84f7f6a7a9 100644
--- a/translations/CustomTarget_translate.mk
+++ b/translations/CustomTarget_translate.mk
@@ -55,20 +55,22 @@ $(translations_DIR)/merge.done : \
$(WORKDIR)/CustomTarget/translations/localization_present.mk && \
touch $@)
-define translations_RULE
-$(translations_DIR)/sdf-l10n/$(1).sdf : \
+$(translations_DIR)/sdf-l10n/%.sdf : \
$(translations_DIR)/sdf-template/en-US.sdf \
$(OUTDIR_FOR_BUILD)/bin/po2lo \
- $$(shell find $(SRCDIR)/translations/source/$(1) -name "*\.po") \
| $(translations_DIR)/sdf-l10n/.dir
- $$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),$(true),SDF,1)
- $$(call gb_Helper_abbreviate_dirs, \
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SDF,1)
+ $(call gb_Helper_abbreviate_dirs, \
$(gb_PYTHON) $(OUTDIR_FOR_BUILD)/bin/po2lo --skipsource -i \
- source/$(1) -t $$< -o $$@ -l $(1))
+ source/$* -t $< -o $@ -l $*)
+
+define translations_make_po_deps
+$(translations_DIR)/sdf-l10n/$(1).sdf : \
+ $$(shell find $(SRCDIR)/translations/source/$(1) -name "*\.po")
endef
-$(foreach lang,$(translations_LANGS),$(eval $(call translations_RULE,$(lang))))
+$(eval $(foreach lang,$(translations_LANGS),$(call translations_make_po_deps,$(lang))))
$(translations_DIR)/sdf-l10n/qtz.sdf : \
$(translations_DIR)/sdf-template/en-US.sdf \