diff options
author | David Tardon <dtardon@redhat.com> | 2013-04-06 14:02:02 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-11 03:38:01 +0000 |
commit | 3404d1e7d9125773466e2f55849c55704d8565f2 (patch) | |
tree | e13377c443105b1a56e607c57153bee25b35fbf1 /solenv/gbuild/UIConfig.mk | |
parent | ed729831317430648157918becdaf19840b16b71 (diff) |
use extra package for every lang
Change-Id: Iccd5225b65887734ff599ca247109c2c1ce4ec25
Reviewed-on: https://gerrit.libreoffice.org/3226
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'solenv/gbuild/UIConfig.mk')
-rw-r--r-- | solenv/gbuild/UIConfig.mk | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk index 1bd01be318bc..3cc33ba7c46f 100644 --- a/solenv/gbuild/UIConfig.mk +++ b/solenv/gbuild/UIConfig.mk @@ -107,20 +107,21 @@ $(call gb_UIConfig_get_clean_target,%) : 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)))) @@ -128,6 +129,13 @@ $(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 + # gb_UIConfig__package_uifile target package destfile srcfile define gb_UIConfig__package_uifile $(call gb_Package_add_file,$(2),xml/uiconfig/$(1)/ui/$(3),$(4)) @@ -136,23 +144,35 @@ endef # 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 define gb_UIConfig__add_translations_impl $(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 |