[Libreoffice-commits] .: librelogo/CustomTarget_librelogo.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 29 00:01:16 PST 2012


 librelogo/CustomTarget_librelogo.mk |   32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

New commits:
commit 314e18d44b8d40fe29a6c94d6bbbf5ad17ca889a
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Nov 29 08:36:47 2012 +0100

    add dep on .po file
    
    Change-Id: I1f752dd5a912f4ecd4db6de72e0a8eccada3091a

diff --git a/librelogo/CustomTarget_librelogo.mk b/librelogo/CustomTarget_librelogo.mk
index 33b84c7..03d6e6c 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} \
 	)
 


More information about the Libreoffice-commits mailing list