summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-01-04 22:20:00 +0100
committerAndras Timar <atimar@suse.com>2012-01-04 22:24:11 +0100
commiteaa58fe31ce5a7f337b56314fee9484347bfc67d (patch)
tree5a7e7f9f6e74cdff0e6d63ca515493924021bef5
parenta0fa723ed5761609d2c31061fdd0282a2f1df6e7 (diff)
extension help localizer help functions
-rw-r--r--solenv/gbuild/Extension.mk25
1 files changed, 24 insertions, 1 deletions
diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index 7d4bb34e01e5..6044f4f657b3 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -39,6 +39,9 @@ gb_Extension_XRMEXCOMMAND := \
gb_Extension_PROPMERGETARGET := $(call gb_Executable_get_target,propmerge)
gb_Extension_PROPMERGECOMMAND := \
$(PERL) $(gb_Extension_PROPMERGETARGET)
+gb_Extension_HELPEXTARGET := $(call gb_Executable_get_target,helpex)
+gb_Extension_HELPEXCOMMAND := \
+ $(gb_Helper_set_ld_path) $(gb_Extension_HELPEXTARGET)
gb_Extension_SDFLOCATION := $(SRCDIR)/translations/$(INPATH)/misc/sdf/
# does not contain en-US because it is special cased in gb_Extension_Extension
gb_Extension_LANGS := $(filter-out en-US,$(gb_WITH_LANG))
@@ -130,7 +133,7 @@ $(call gb_Extension_get_target,$(1)) : SDF2 := $(gb_Extension_SDFLOCATION)$(subs
$(call gb_Extension_get_target,$(1)) : $$(SDF2)
$(call gb_Extension_get_target,$(1)) : $(call gb_Extension_get_workdir,$(1))/$(2)
$(call gb_Extension_get_workdir,$(1))/$(2) : $(3)
- $$(call gb_Output_announce,$(2),$(true),PRP,3)
+ $(call gb_Output_announce,$(2),$(true),PRP,3)
mkdir -p $$(dir $$@)
cp -f $$< $$@
$(gb_Extension_PROPMERGECOMMAND) -i $$@ -m $$(SDF2)
@@ -138,4 +141,24 @@ endif
endef
+# localize extension help
+define gb_Extension_localize_help
+ifneq ($(strip $(gb_WITH_LANG)),)
+$(call gb_Extension_get_target,$(1)) : FILES += $(foreach lang,$(gb_Extension_LANGS),$(subst lang,$(lang),$(2)))
+$(call gb_Extension_get_target,$(1)) : SDF3 := $(realpath $(gb_Extension_SDFLOCATION)$(subst $(SRCDIR),,$(dir $(3)))localize.sdf)
+$(call gb_Extension_get_target,$(1)) : $$(SDF3)
+$(foreach lang,$(gb_Extension_LANGS),$(call gb_Extension_localize_help_onelang,$(1),$(subst lang,$(lang),$(2)),$(3),$(lang)))
+endif
+
+endef
+
+define gb_Extension_localize_help_onelang
+$(call gb_Extension_get_target,$(1)) : $(call gb_Extension_get_workdir,$(1))/$(2)
+$(call gb_Extension_get_workdir,$(1))/$(2) : $(3)
+ $(call gb_Output_announce,$(2),$(true),XHP,3)
+ mkdir -p $$(dir $$@)
+ $(gb_Extension_HELPEXCOMMAND) -i $$< -o $$@ -l $(4) -m $$(SDF3)
+
+endef
+
# vim: set noet sw=4 ts=4: