diff options
-rw-r--r-- | librelogo/CustomTarget_librelogo.mk | 32 |
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} \ ) |