summaryrefslogtreecommitdiffstats
path: root/CustomTarget_html.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-02 10:40:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-05-02 10:42:28 +0200
commit09f72e64083e9a6003e6c10fa26e1c5ca3c4d785 (patch)
tree271d659d556206c38c6f4b2e9a1c30bb3b0ff79b /CustomTarget_html.mk
parentMake --with-help=html work on Windows (diff)
downloadhelp-09f72e64083e9a6003e6c10fa26e1c5ca3c4d785.tar.gz
help-09f72e64083e9a6003e6c10fa26e1c5ca3c4d785.zip
tdf#116240: Include --with-help=html in installation sets
...by extending the hackery in helpcontent2/CustomTarget_html.mk (see comment there). (Ultimately, the gbuild HelpTarget machinery should probably be adapted to the needs of this new help format, once the old help format is no longer supported?) The Perl packaging code finds source files through the "include" paths specified in instsetoo_native/util/openoffice.lst.in. To avoid potential name clashes, put the new .filelist files into workdir/CustomTarget/helpcontent2/help3xsl/filelists/html-help/ sub-directories. read_filelist in solenv/bin/modules/installer/filelists.pm does not strip white space following the last item in a file list, but (with HAVE_GNUMAKE_FILE_FUNC) the gb_HelpTarget_get_translation_target .filelist files (which are then transformed with sed into the .html .filelist files read by the Perl packaging code) may contain such trailing white space. So $(strip ...) their content in solenv/gbuild/HelpTarget.mk. This is the helpcontent2 part of a change spanning core and helpcontent2. Change-Id: I730caaaec783d0a0a9c79caf85268a775220dee3 Reviewed-on: https://gerrit.libreoffice.org/53724 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'CustomTarget_html.mk')
-rw-r--r--CustomTarget_html.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 5d913826c2..e4c1626e5d 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
$(lang)/html.text \
$(foreach module,$(html_TREE_MODULES),$(module)/$(lang)/contents.part) \
$(foreach module,$(html_BMARK_MODULES),$(firstword $(subst :, ,$(module)))/$(lang)/bookmarks.part) \
+ $(foreach module,$(html_TEXT_MODULES),filelists/html-help/$(module)/$(lang).filelist) \
) \
))
@@ -171,4 +172,24 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
) > $@ \
)
+# The various gid_File_Help_*_Zip in scp2 that use EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG expect
+# $(module)/$(lang).filelist files containing lists of files (in instdir) for the corresponding
+# module/lang parts of help data. As a hack, generate those from the existing HelpTarget file
+# lists, which specify the original .xhp files (in SRCDIR for en-US, translated for all other
+# langs). For the shared module, also include the per-lang non .xhp/.html files from AllLangPackage
+# helpcontent2_html_lang:
+
+# html__filelist,lang,module
+define html__filelist
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/filelists/html-help/$(2)/$(1).filelist: \
+ $(call gb_HelpTarget_get_filelist,$(2)/$(1)) \
+ $(if $(filter $(2),shared),$(call gb_Package_get_target,helpcontent2_html_lang_$(1)))
+ mkdir -p $$$$(dirname $$@)
+ sed -e 's|$(if $(filter $(1),en-US),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/|$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(1)/|g' -e 's|.xhp|.html|g' $(call gb_HelpTarget_get_filelist,$(2)/$(1)) > $$@
+ $(if $(filter $(2),shared),cat $(call gb_Package_get_target,helpcontent2_html_lang_$(1)) >> $$@,:)
+
+endef
+
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(foreach module,$(html_TEXT_MODULES),$(call html__filelist,$(lang),$(module)))))
+
# vim: set noet sw=4 ts=4: