diff options
Diffstat (limited to 'solenv/gbuild/AllLangResTarget.mk')
-rw-r--r-- | solenv/gbuild/AllLangResTarget.mk | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index 866593d12f90..afa8027abdc0 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -53,20 +53,24 @@ gb_SrsPartMergeTarget_TRANSEXCOMMAND := \ define gb_SrsPartMergeTarget__command $(call gb_Output_announce,$(3),$(true),srs,1) +MERGEINPUT=`$(gb_MKTEMP)` && \ +echo $(POFILES) > $${MERGEINPUT} && \ $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ $(gb_SrsPartMergeTarget_TRANSEXCOMMAND) \ -p $(firstword $(subst /, ,$(2))) \ -i $(3) \ -o $(1) \ - -m $(SDF) \ - -l all) + -m $${MERGEINPUT} \ + -l all) && \ +rm -rf $${MERGEINPUT} endef $(call gb_SrsPartMergeTarget_get_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY) $(gb_SrsPartMergeTarget_TRANSEXTARGET) - $(if $(SDF),$(call gb_SrsPartMergeTarget__command,$@,$*,$<),mkdir -p $(dir $@) && cp $< $@) - + $(if $(filter $(words $(POFILES)),$(words $(wildcard $(POFILES)))),\ + $(call gb_SrsPartMergeTarget__command,$@,$*,$<),\ + mkdir -p $(dir $@) && cp $< $@) # SrsPartTarget class @@ -110,7 +114,8 @@ $(call gb_SrsPartTarget_get_target,$(1)) : MERGEDFILE := else $(call gb_SrsPartTarget_get_target,$(1)) : MERGEDFILE := $(call gb_SrsPartMergeTarget_get_target,$(1)) $(call gb_SrsPartTarget_get_target,$(1)) : $(call gb_SrsPartMergeTarget_get_target,$(1)) -$(call gb_SrsPartMergeTarget_get_target,$(1)) : SDF := $(wildcard $(gb_SDFLOCATION)/$(dir $(1))localize.sdf) +$(call gb_SrsPartMergeTarget_get_target,$(1)) : \ + POFILES := $(foreach lang,$(filter-out en-US,$(gb_WITH_LANG)),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po) endif endef @@ -123,8 +128,10 @@ $(call gb_SrsTemplatePartTarget_get_target,$(1)) : $(call gb_SrsPartMergeTarget_ mkdir -p $$(dir $$@) && \ cp $$< $$@) ifneq ($(strip $(WITH_LANG)),) -$(call gb_SrsPartMergeTarget_get_target,$(1)) : SDF := $(wildcard $(gb_SDFLOCATION)/$(dir $(1))localize.sdf) -$(call gb_SrsPartMergeTarget_get_target,$(1)) : $(wildcard $(gb_SDFLOCATION)/$(dir $(1))localize.sdf) +$(call gb_SrsPartMergeTarget_get_target,$(1)) : \ + POFILES := $(foreach lang,$(filter-out en-US,$(gb_WITH_LANG)),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po) +$(call gb_SrsPartMergeTarget_get_target,$(1)) : \ + $(wildcard $(foreach lang,$(filter-out en-US,$(gb_WITH_LANG)),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po)) endif endef |