summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/gbuild/AllLangHelp.mk10
-rw-r--r--solenv/gbuild/HelpTarget.mk24
2 files changed, 34 insertions, 0 deletions
diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk
index dd0339530b17..e547508d5297 100644
--- a/solenv/gbuild/AllLangHelp.mk
+++ b/solenv/gbuild/AllLangHelp.mk
@@ -120,6 +120,16 @@ $(foreach lang,$(gb_AllLangHelp_LANGS),$(call gb_HelpTarget_add_files,$(call gb_
endef
+# Add a localized file from helpdir under a new name.
+#
+# This is a hack needed for err.html in shared help module.
+#
+# gb_AllLangHelp_add_helpdir_file module filename file
+define gb_AllLangHelp_add_helpdir_file
+$(foreach lang,$(gb_AllLangHelp_LANGS),$(call gb_HelpTarget_add_helpdir_file,$(call gb_AllLangHelp__get_helpname,$(1),$(lang)),$(2),$(3)))
+
+endef
+
# gb_AllLangHelp__use_module module other-module lang
define gb_AllLangHelp__use_module
$(call gb_HelpTarget_use_module,$(call gb_AllLangHelp__get_helpname,$(1),$(3)),$(call gb_AllLangHelp__get_helpname,$(2),$(3)))
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index ed5b43f3100f..202961e7d6a0 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -273,6 +273,7 @@ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\
$(if $(HELP_CONFIGDIR),-add $(HELP_MODULE).cfg $(HELP_CONFIGDIR)/$(HELP_LANG)/$(HELP_MODULE).cfg) \
$(if $(HELP_TREE),-add $(HELP_MODULE).tree $(HELP_TREE)) \
$(foreach file,$(HELP_ADD_FILES),-add $(notdir $(file)) $(file)) \
+ $(foreach extra,$(HELP_EXTRA_ADD_FILES),-add $(subst :, ,$(extra))) \
$(HELP_FILES) \
$(if $(HELP_LINKED_MODULES),\
$(shell cat $(foreach module,$(HELP_LINKED_MODULES),$(call gb_HelpTarget_get_filelist,$(module)))) \
@@ -311,6 +312,7 @@ $(call gb_HelpLinkTarget_get_clean_target,%) :
define gb_HelpLinkTarget_HelpLinkTarget
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_ADD_FILES :=
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGDIR :=
+$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_EXTRA_ADD_FILES :=
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_FILES :=
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_MODULE := $(2)
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_LANG := $(3)
@@ -362,6 +364,17 @@ $(call gb_HelpLinkTarget_get_target,$(1)) : $(2)
endef
+# Add an arbitrary file to the help pack under a new name.
+#
+# The file will be added to the root directory of the pack.
+#
+# gb_HelpLinkTarget_add_renamed_file target filename file
+define gb_HelpLinkTarget_add_renamed_file
+$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_EXTRA_ADD_FILES += $(strip $(2)):$(strip $(3))
+$(call gb_HelpLinkTarget_get_target,$(1)) : $(3)
+
+endef
+
# Use help files from another help module for references.
#
# gb_HelpLinkTarget_use_module target help
@@ -681,6 +694,17 @@ $(foreach file,$(2),$(call gb_HelpTarget_add_file,$(1),$(file)))
endef
+# Add a localized file from helpdir under a new name.
+#
+# This is a hack needed for err.html in shared help module.
+#
+# gb_HelpTarget_add_helpdir_file target filename file
+define gb_HelpTarget_add_helpdir_file
+$(call gb_HelpLinkTarget_add_renamed_file,$(1),$(2),$(call gb_HelpTarget__get_helpfile,$(1),$(3)))
+$(call gb_HelpTarget__add_file,$(1),$(2))
+
+endef
+
# gb_HelpTarget_use_module target module
define gb_HelpTarget_use_module
$(call gb_HelpLinkTarget_use_module,$(1),$(2))