summaryrefslogtreecommitdiff
path: root/librelogo
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-11-29 08:36:47 +0100
committerDavid Tardon <dtardon@redhat.com>2012-11-29 09:00:21 +0100
commit314e18d44b8d40fe29a6c94d6bbbf5ad17ca889a (patch)
treeb2f60dcb7611d58849c6cdc848804feb10f663ae /librelogo
parente174c78a55c16556bf27f12c9e7c3319116eb072 (diff)
add dep on .po file
Change-Id: I1f752dd5a912f4ecd4db6de72e0a8eccada3091a
Diffstat (limited to 'librelogo')
-rw-r--r--librelogo/CustomTarget_librelogo.mk32
1 files changed, 21 insertions, 11 deletions
diff --git a/librelogo/CustomTarget_librelogo.mk b/librelogo/CustomTarget_librelogo.mk
index 33b84c77791c..03d6e6c6fb4c 100644
--- a/librelogo/CustomTarget_librelogo.mk
+++ b/librelogo/CustomTarget_librelogo.mk
@@ -11,33 +11,43 @@ $(eval $(call gb_CustomTarget_CustomTarget,librelogo/locproperties))
librelogo_DIR := $(call gb_CustomTarget_get_workdir,librelogo/locproperties)
+define librelogo_Properties_Properties
+$(call librelogo_Properties__Properties_impl,$(librelogo_DIR)/LibreLogo_$(1).properties,$(SRCDIR)/librelogo/source/pythonpath/LibreLogo_en_US.properties,$(gb_POLOCATION)/$(2)/librelogo/source/pythonpath.po,$(2))
+
+endef
+
+define librelogo_Properties__Properties_impl
+$(1) : LANG := $(4)
+$(1) : POFILE := $(3)
+$(1) : SOURCE := $(2)
+
+$(call gb_CustomTarget_get_target,librelogo/locproperties) : $(1)
+$(1) : $(2) \
+ $(wildcard $(3))
+
+endef
+
ifneq ($(strip $(gb_WITH_LANG)),)
-librelogo_LANGS := $(subst -,_,$(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG))))
-librelogo_LOCPROPERTIES := $(foreach lang,$(librelogo_LANGS),$(librelogo_DIR)/LibreLogo_$(lang).properties)
-else
-librelogo_LOCPROPERTIES :=
+librelogo_LANGS := $(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG)))
+$(eval $(foreach lang,$(librelogo_LANGS),$(call librelogo_Properties_Properties,$(subst -,_,$(lang)),$(lang))))
endif
librelogo_PROPMERGETARGET := $(call gb_Executable_get_target_for_build,propex)
librelogo_PROPMERGECOMMAND := $(gb_Helper_set_ld_path) $(librelogo_PROPMERGETARGET)
-$(call gb_CustomTarget_get_target,librelogo/locproperties) : $(librelogo_LOCPROPERTIES)
-
$(librelogo_DIR)/LibreLogo_%.properties : \
- $(SRCDIR)/librelogo/source/pythonpath/LibreLogo_en_US.properties \
$(librelogo_PROPMERGETARGET) \
| $(librelogo_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1)
$(call gb_Helper_abbreviate_dirs, \
- LANG=$(subst _,-,$(subst $(librelogo_DIR)/LibreLogo_,,$(subst .properties,,$@))) && \
MERGEINPUT=`$(gb_MKTEMP)` && \
- echo $(gb_POLOCATION)/$${LANG}/librelogo/source/pythonpath.po > $${MERGEINPUT} && \
+ echo $(POFILE) > $${MERGEINPUT} && \
$(librelogo_PROPMERGECOMMAND) \
-p librelogo \
- -i $< \
+ -i $(SOURCE) \
-o $@ \
-m $${MERGEINPUT} \
- -l $${LANG} && \
+ -l $(LANG) && \
rm -rf $${MERGEINPUT} \
)