diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-04-20 09:20:31 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-04-21 18:57:17 +0200 |
commit | 36b3bcefcf13996610239f95b1dce9f291bde95d (patch) | |
tree | 4796801ca25a41422381fce137fee5c21f3fef64 /solenv | |
parent | blind fix for MacOS X build problem (diff) | |
download | core-36b3bcefcf13996610239f95b1dce9f291bde95d.tar.gz core-36b3bcefcf13996610239f95b1dce9f291bde95d.zip |
Some changes in qtz handling
Executalbes, which work one language, generat qtz by own.
(stringex,helpex,treex,propex)
So these executables can generate qtz without po file
when use them with qtz, call them with "-m" flag without parameter.
Change-Id: I56c34db7151dc3ef0ce1c85ed607719e4cbb5e92
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/Dictionary.mk | 26 | ||||
-rw-r--r-- | solenv/gbuild/ExtensionTarget.mk | 88 | ||||
-rw-r--r-- | solenv/gbuild/HelpTarget.mk | 54 |
3 files changed, 110 insertions, 58 deletions
diff --git a/solenv/gbuild/Dictionary.mk b/solenv/gbuild/Dictionary.mk index a7d458ffefdf..eb7ba2155512 100644 --- a/solenv/gbuild/Dictionary.mk +++ b/solenv/gbuild/Dictionary.mk @@ -59,14 +59,22 @@ gb_PropertiesTranslateTarget_DEPS := $(call gb_Executable_get_runtime_dependenci define gb_PropertiesTranslateTarget__command $(call gb_Output_announce,$(2),$(true),PRP,1) -$(call gb_Helper_abbreviate_dirs,\ - MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \ - $(gb_PropertiesTranslateTarget_COMMAND) \ - -i $(PROPERTIES_FILE) \ - -l $(LANG) \ - -m $${MERGEINPUT} \ - -o $(1) && \ - rm -f $${MERGEINPUT} \ +$(call gb_Helper_abbreviate_dirs, \ + $(if $(filter-out qtz,$(LANG)), \ + MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \ + $(gb_PropertiesTranslateTarget_COMMAND) \ + -i $(PROPERTIES_FILE) \ + -l $(LANG) \ + -m $${MERGEINPUT} \ + -o $(1) && \ + rm -f $${MERGEINPUT} \ + , \ + $(gb_PropertiesTranslateTarget_COMMAND) \ + -i $(PROPERTIES_FILE) \ + -l $(LANG) \ + -m \ + -o $(1) \ + ) \ ) endef @@ -156,7 +164,7 @@ endef # gb_DescriptionTranslateTarget__DescriptionTranslateTarget_onelang target pobase lang define gb_DescriptionTranslateTarget__DescriptionTranslateTarget_onelang -$(call gb_DescriptionTranslateTarget_get_target,$(1)) : POFILES += $(gb_POLOCATION)/$(3)/$(2).po +$(call gb_DescriptionTranslateTarget_get_target,$(1)) : POFILES += $(if $(filter-out qtz,$(3)),$(gb_POLOCATION)/$(3)/$(2).po) $(if $(filter-out qtz,$(3)),\ $(call gb_DescriptionTranslateTarget__DescriptionTranslateTarget_onelang_podeps,$(1),$(gb_POLOCATION)/$(3)/$(2).po)) diff --git a/solenv/gbuild/ExtensionTarget.mk b/solenv/gbuild/ExtensionTarget.mk index 575007091438..547b8ecdd11e 100644 --- a/solenv/gbuild/ExtensionTarget.mk +++ b/solenv/gbuild/ExtensionTarget.mk @@ -217,24 +217,21 @@ endef # localize .properties file # source file is copied to $(WORKDIR) define gb_ExtensionTarget_localize_properties -ifneq ($(gb_TRANS_LANGS),) -ifneq ($(ENABLE_RELEASE_BUILD),TRUE) -$(call gb_ExtensionTarget_localize_properties_onelang,$(1),$(subst en_US,qtz,$(2)),$(3),qtz,$(firstword $(gb_TRANS_LANGS))) -endif -endif -$(foreach lang,$(filter-out qtz,$(gb_ExtensionTarget_ALL_LANGS)),\ +$(foreach lang,$(gb_ExtensionTarget_ALL_LANGS),\ $(call gb_ExtensionTarget_localize_properties_onelang,$(1),$(subst en_US,$(subst -,_,$(lang)),$(2)),$(3),$(lang))) endef define gb_ExtensionTarget_localize_properties_onelang $(call gb_ExtensionTarget_get_target,$(1)) : FILES += $(2) ifneq ($(filter-out en-US,$(4)),) +ifneq ($(filter-out qtz,$(4)),) $(call gb_ExtensionTarget_get_rootdir,$(1))/$(2) : \ POFILE := $(gb_POLOCATION)/$(or $(5),$(4))/$(patsubst /%/,%,$(subst $(SRCDIR),,$(dir $(3)))).po $(call gb_ExtensionTarget_get_rootdir,$(1))/$(2) : \ $(gb_POLOCATION)/$(or $(5),$(4))/$(patsubst /%/,%,$(subst $(SRCDIR),,$(dir $(3)))).po $(gb_POLOCATION)/$(or $(5),$(4))/$(patsubst /%/,%,$(subst $(SRCDIR),,$(dir $(3)))).po : endif +endif $(call gb_ExtensionTarget_get_target,$(1)) : $(call gb_ExtensionTarget_get_rootdir,$(1))/$(2) $(call gb_ExtensionTarget_get_rootdir,$(1))/$(2) \ :| $(call gb_ExtensionTarget__get_preparation_target,$(1)) @@ -243,12 +240,19 @@ $(call gb_ExtensionTarget_get_rootdir,$(1))/$(2) : $(3) \ $$(call gb_Output_announce,$(2),$(true),PRP,3) $$(call gb_Helper_abbreviate_dirs, \ mkdir -p $$(dir $$@) && \ - cp -f $$< $$@ ) - $(if $(filter-out en-US,$(4)), \ - MERGEINPUT=`$(gb_MKTEMP)` && \ - echo $$(POFILE) > $$$${MERGEINPUT} && \ - $(gb_ExtensionTarget_PROPMERGECOMMAND) -i $$< -o $$@ -m $$$${MERGEINPUT} -l $(4) && \ - rm -rf $$$${MERGEINPUT}) + $(if $(filter qtz,$(4)), \ + $(gb_ExtensionTarget_PROPMERGECOMMAND) -i $$< -o $$@ -m -l $(4) \ + , \ + $(if $(filter-out en-US,$(4)), \ + MERGEINPUT=`$(gb_MKTEMP)` && \ + echo $$(POFILE) > $$$${MERGEINPUT} && \ + $(gb_ExtensionTarget_PROPMERGECOMMAND) -i $$< -o $$@ -m $$$${MERGEINPUT} -l $(4) && \ + rm -rf $$$${MERGEINPUT} \ + , \ + cp -f $$< $$@ \ + ) \ + ) \ + ) endef @@ -262,7 +266,7 @@ endef # (i.e., if $(4) is empty the en-US source file is $(2)/$(3), otherwise it # is $(2)/$(4)) define gb_ExtensionTarget_add_helpfile -$(foreach lang,$(filter-out qtz,$(gb_ExtensionTarget_ALL_LANGS)), \ +$(foreach lang,$(gb_ExtensionTarget_ALL_LANGS), \ $(call gb_ExtensionTarget__localize_helpfile_onelang,$(1),$(2),$(3),$(4),$(lang)) \ $(call gb_ExtensionTarget__add_compiled_help_dependency_onelang,$(1),$(lang))) endef @@ -276,7 +280,7 @@ endef # $(4): relative path of source help.tree file # $(5): relative path of localized xhp files (PlatformID included) define gb_ExtensionTarget_add_helptreefile -$(foreach lang,$(filter-out qtz,$(gb_ExtensionTarget_ALL_LANGS)), \ +$(foreach lang,$(gb_ExtensionTarget_ALL_LANGS), \ $(call gb_ExtensionTarget__localize_helptreefile_onelang,$(1),$(2),$(3),$(4),$(lang),$(5)) \ $(call gb_ExtensionTarget__add_compiled_help_dependency_onelang,$(1),$(lang))) endef @@ -309,12 +313,14 @@ $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5).done : \ $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)-xhp.done : \ $(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(3) ifneq ($(filter-out en-US,$(5)),) +ifneq ($(filter-out qtz,$(5)),) $(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(3) : \ POFILE := $(gb_POLOCATION)/$(5)$(subst $(SRCDIR),,$(2))$(patsubst %/,/%.po,$(patsubst ./,.po,$(dir $(or $(4),$(3))))) $(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(3) : \ $(gb_POLOCATION)/$(5)$(subst $(SRCDIR),,$(2))$(patsubst %/,/%.po,$(patsubst ./,.po,$(dir $(or $(4),$(3))))) $(gb_POLOCATION)/$(5)$(subst $(SRCDIR),,$(2))$(patsubst %/,/%.po,$(patsubst ./,.po,$(dir $(or $(4),$(3))))) : endif +endif $(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(3) : \ $(if $(filter-out en-US,$(5)),$(gb_ExtensionTarget_HELPEXDEPS)) | \ $(call gb_ExtensionTarget_get_workdir,$(1))/help/.dir @@ -322,18 +328,26 @@ $(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(3) : \ $(2)/$(or $(4),$(3)) $$(call gb_Output_announce,$(1) $(3) $(5),$(true),XHP,3) $$(call gb_Helper_abbreviate_dirs, \ - mkdir -p $$(dir $$@) && \ - $(if $(filter-out en-US,$(5)), \ - MERGEINPUT=`$(gb_MKTEMP)` && \ - echo $$(POFILE) > $$$${MERGEINPUT} && \ - $(gb_ExtensionTarget_HELPEXCOMMAND) -i $$< -o $$@ -l $(5) \ - -m $$$${MERGEINPUT} && \ - rm -rf $$$${MERGEINPUT}, \ - cp $$< $$@)) && \ - touch $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)-xhp.done + mkdir -p $$(dir $$@) && \ + $(if $(filter qtz,$(5)), \ + $(gb_ExtensionTarget_HELPEXCOMMAND) -i $$< -o $$@ -l $(5) -m \ + , \ + $(if $(filter-out en-US,$(5)), \ + MERGEINPUT=`$(gb_MKTEMP)` && \ + echo $$(POFILE) > $$$${MERGEINPUT} && \ + $(gb_ExtensionTarget_HELPEXCOMMAND) -i $$< -o $$@ -l $(5) \ + -m $$$${MERGEINPUT} && \ + rm -rf $$$${MERGEINPUT} \ + , \ + cp $$< $$@ \ + ) \ + ) && \ + touch $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)-xhp.done \ + ) endef + # localize one help.tree for one language; the result is stored as # help/$(4)/$(3) in the extension's workdir; # $(1): extension identifier @@ -349,12 +363,14 @@ define gb_ExtensionTarget__localize_helptreefile_onelang $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5).done : \ $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)/$(3) ifneq ($(filter-out en-US,$(5)),) +ifneq ($(filter-out qtz,$(5)),) $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)/$(3) : \ POFILE := $(gb_POLOCATION)/$(5)$(subst $(SRCDIR),,$(2))$(patsubst %/,/%.po,$(patsubst ./,.po,$(dir $(4)))) $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)/$(3) : \ $(gb_POLOCATION)/$(5)$(subst $(SRCDIR),,$(2))$(patsubst %/,/%.po,$(patsubst ./,.po,$(dir $(4)))) $(gb_POLOCATION)/$(5)$(subst $(SRCDIR),,$(2))$(patsubst %/,/%.po,$(patsubst ./,.po,$(dir $(4)))) : endif +endif $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)/$(3) : \ $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)-xhp.done $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)/$(3) : \ @@ -365,15 +381,23 @@ $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(5)/$(3) : \ $$(call gb_Output_announce,$(1) $(3) $(5),$(true),TRE,3) $$(call gb_Helper_abbreviate_dirs, \ mkdir -p $$(dir $$@) && \ - $(if $(filter-out en-US,$(5)), \ - MERGEINPUT=`$(gb_MKTEMP)` && \ - echo $$(POFILE) > $$$${MERGEINPUT} && \ - $(gb_ExtensionTarget_TREEXCOMMAND) -i $$< -o $$@ -l $(5) \ - -m $$$${MERGEINPUT} \ - -r $$(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(6) && \ - rm -rf $$$${MERGEINPUT}, \ - $(gb_ExtensionTarget_TREEXCOMMAND) -i $$< -o $$@ -l $(5) \ - -r $$(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(6) )) + $(if $(filter qtz,$(5)), \ + $(gb_ExtensionTarget_TREEXCOMMAND) -i $$< -o $$@ -l $(5) -m \ + -r $$(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(6) \ + , \ + $(if $(filter-out en-US,$(5)), \ + MERGEINPUT=`$(gb_MKTEMP)` && \ + echo $$(POFILE) > $$$${MERGEINPUT} && \ + $(gb_ExtensionTarget_TREEXCOMMAND) -i $$< -o $$@ -l $(5) \ + -m $$$${MERGEINPUT} \ + -r $$(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(6) && \ + rm -rf $$$${MERGEINPUT} \ + , \ + $(gb_ExtensionTarget_TREEXCOMMAND) -i $$< -o $$@ -l $(5) \ + -r $$(call gb_ExtensionTarget_get_workdir,$(1))/help/$(5)/$(6) \ + ) \ + ) \ + ) endef diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk index 5606fc048d3d..9aa622e8fdd9 100644 --- a/solenv/gbuild/HelpTarget.mk +++ b/solenv/gbuild/HelpTarget.mk @@ -39,16 +39,26 @@ gb_HelpTranslatePartTarget_COMMAND := $(call gb_Executable_get_command,helpex) define gb_HelpTranslatePartTarget__command $(call gb_Output_announce,$(2),$(true),HPX,1) HELPFILES=$(call var2file,$(shell $(gb_MKTEMP)),100,$(filter %.xhp,$(3))) && \ -POFILES=$(call var2file,$(shell $(gb_MKTEMP)),100,$(sort $(POFILES))) && \ -$(call gb_Helper_abbreviate_dirs,\ - $(gb_HelpTranslatePartTarget_COMMAND) \ - -l $(HELP_LANG) \ - -mi $${HELPFILES} \ - -m $${POFILES} \ - -o $(call gb_HelpTranslatePartTarget_get_workdir,$(2)) \ +$(call gb_Helper_abbreviate_dirs, \ + $(if $(filter-out qtz,$(HELP_LANG)), \ + POFILES=$(call var2file,$(shell $(gb_MKTEMP)),100,$(sort $(POFILES))) && \ + $(gb_HelpTranslatePartTarget_COMMAND) \ + -l $(HELP_LANG) \ + -mi $${HELPFILES} \ + -m $${POFILES} \ + -o $(call gb_HelpTranslatePartTarget_get_workdir,$(2)) && \ + rm -f $${POFILES} \ + , \ + $(gb_HelpTranslatePartTarget_COMMAND) \ + -l $(HELP_LANG) \ + -mi $${HELPFILES} \ + -m \ + -o $(call gb_HelpTranslatePartTarget_get_workdir,$(2)) \ + ) \ ) && \ touch $@ && \ -rm -f $${HELPFILES} $${POFILES} +rm -f $${HELPFILES} + endef $(dir $(call gb_HelpTranslatePartTarget_get_target,%)).dir : @@ -177,16 +187,26 @@ gb_HelpTreeTarget_COMMAND := $(call gb_Executable_get_command,treex) define gb_HelpTreeTarget__command $(call gb_Output_announce,$(2),$(true),TRE,1) -POFILES=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILES)) && \ $(call gb_Helper_abbreviate_dirs,\ - $(gb_HelpTreeTarget_COMMAND) \ - -i $(HELP_TREE) \ - -l $(HELP_LANG) \ - -m $${POFILES} \ - -o $@ \ - -r $(HELP_TEXTDIR) \ -) && \ -rm -f $${POFILES} + $(if $(filter-out qtz,$(HELP_LANG)), \ + POFILES=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILES)) && \ + $(gb_HelpTreeTarget_COMMAND) \ + -i $(HELP_TREE) \ + -l $(HELP_LANG) \ + -m $${POFILES} \ + -o $@ \ + -r $(HELP_TEXTDIR) && \ + rm -f $${POFILES} \ + , \ + $(gb_HelpTreeTarget_COMMAND) \ + -i $(HELP_TREE) \ + -l $(HELP_LANG) \ + -m \ + -o $@ \ + -r $(HELP_TEXTDIR) \ + ) \ +) + endef $(dir $(call gb_HelpTreeTarget_get_target,%)).dir : |