Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3226

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/26/3226/1

use extra package for every lang

Change-Id: Iccd5225b65887734ff599ca247109c2c1ce4ec25
---
M solenv/gbuild/UIConfig.mk
1 file changed, 30 insertions(+), 10 deletions(-)



diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 1bd01be..3cc33ba 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -107,24 +107,32 @@
                rm -f $(call gb_UIConfig_get_target,$*) \
        )
 
+gb_UIConfig_get_packagename = UIConfig/$(1)
+gb_UIConfig_get_packagename_for_lang = UIConfig/$(1)_$(2)
+
 # Processes and delivers a set of UI configuration files.
 #
 # gb_UIConfig_UIConfig modulename
 define gb_UIConfig_UIConfig
-$(call gb_Package_Package_internal,$(1)_ui,$(SRCDIR))
+$(call gb_Package_Package_internal,$(call gb_UIConfig_get_packagename,$(1)),$(SRCDIR))
 $(call gb_UIConfig_get_target,$(1)) :| $(dir $(call gb_UIConfig_get_target,$(1))).dir
-$(call gb_UIConfig_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui)
+$(call gb_UIConfig_get_target,$(1)) :| $(call gb_Package_get_target,$(call 
gb_UIConfig_get_packagename,$(1)))
 $(call gb_Postprocess_get_target,AllUIConfigs) : $(call gb_UIConfig_get_target,$(1))
-$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui)
+$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(call 
gb_UIConfig_get_packagename,$(1)))
 
 ifneq ($(gb_UIConfig_LANGS),)
-$(call gb_Package_Package_internal,$(1)_ui_localized,$(gb_UILocalizeTarget_WORKDIR))
-$(call gb_UIConfig_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui_localized)
-$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui_localized)
+$(foreach lang,$(gb_UIConfig_LANGS),$(call gb_UIConfig__UIConfig_for_lang,$(1),$(lang)))
 endif
 
 $$(eval $$(call gb_Module_register_target,$(call gb_UIConfig_get_target,$(1)),$(call 
gb_UIConfig_get_clean_target,$(1))))
 $(call gb_Helper_make_userfriendly_targets,$(1),UIConfig)
+
+endef
+
+define gb_UIConfig__UIConfig_for_lang
+$(call gb_Package_Package_internal,$(call 
gb_UIConfig_get_packagename_for_lang,$(1),$(2)),$(gb_UILocalizeTarget_WORKDIR))
+$(call gb_UIConfig_get_target,$(1)) :| $(call gb_Package_get_target,$(call 
gb_UIConfig_get_packagename_for_lang,$(1),$(2)))
+$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(call 
gb_UIConfig_get_packagename_for_lang,$(1),$(2)))
 
 endef
 
@@ -136,14 +144,27 @@
 
 # gb_UIConfig__add_uifile target file
 define gb_UIConfig__add_uifile
-$(call gb_UIConfig__package_uifile,$(1),$(1)_ui,$(notdir $(2)).ui,$(2).ui)
+$(call gb_UIConfig__package_uifile,$(1),$(call gb_UIConfig_get_packagename,$(1)),$(notdir 
$(2)).ui,$(2).ui)
 
 endef
 
+# Add a l10n for an .ui file to respective lang package.
+#
 # gb_UIConfig__add_uifile_for_lang target file lang
 define gb_UIConfig__add_uifile_for_lang
-$(call gb_UIConfig__package_uifile,$(1),$(1)_ui_localized,res/$(3)/$(notdir $(2)),$(2)/$(3).ui)
+$(call gb_UIConfig__package_uifile,$(1),$(call 
gb_UIConfig_get_packagename_for_lang,$(1),$(3)),res/$(3)/$(notdir $(2)),$(2)/$(3).ui)
 
+endef
+
+# Add a l10n for an .ui file to respective lang package.
+#
+# This is only for "real" languages, i.e., everything except qtz.
+#
+# gb_UIConfig__add_uifile_for_real_lang target file lang
+define gb_UIConfig__add_uifile_for_real_lang
+$(if $(filter qtz,$(3)),$(call gb_Output_error,gb_UIConfig__add_uifile_for_real_lang called with 
qtz))
+$(call gb_Package_get_preparation_target,$(call 
gb_UIConfig_get_packagename_for_lang,$(1),$(lang))) : $(call gb_UILocalizeTarget_get_target,$(2))
+$(call gb_UIConfig__add_uifile_for_lang,$(1),$(2),$(lang))
 endef
 
 # gb_UIConfig__add_translations_impl target uifile langs
@@ -151,8 +172,7 @@
 $(call gb_UILocalizeTarget_UILocalizeTarget,$(2))
 $(call gb_UIConfig_get_target,$(1)) : $(call gb_UILocalizeTarget_get_target,$(2))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_UILocalizeTarget_get_clean_target,$(2))
-$(call gb_Package_get_preparation_target,$(1)_ui_localized) : $(call 
gb_UILocalizeTarget_get_target,$(2))
-$(foreach lang,$(3),$(call gb_UIConfig__add_uifile_for_lang,$(1),$(2),$(lang)))
+$(foreach lang,$(3),$(call gb_UIConfig__add_uifile_for_real_lang,$(1),$(2),$(lang)))
 
 endef
 

-- 
To view, visit https://gerrit.libreoffice.org/3226
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccd5225b65887734ff599ca247109c2c1ce4ec25
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Tardon <dtardon@redhat.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.