add dep on .po file

Change-Id: I1f752dd5a912f4ecd4db6de72e0a8eccada3091a
This commit is contained in:
David Tardon 2012-11-29 08:36:47 +01:00
parent e174c78a55
commit 314e18d44b

View file

@ -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} \
)