AllLangPackage_html_lang.mk |    6 +++---
 CustomTarget_html.mk        |   21 +++++++++++++++++++++
 Module_helpcontent2.mk      |    2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)

New commits:
commit 09f72e64083e9a6003e6c10fa26e1c5ca3c4d785
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Wed May 2 10:40:01 2018 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/Package_html_lang.mk b/AllLangPackage_html_lang.mk
similarity index 56%
rename from Package_html_lang.mk
rename to AllLangPackage_html_lang.mk
index 7368403e8..9be268d86 100644
--- a/Package_html_lang.mk
+++ b/AllLangPackage_html_lang.mk
@@ -7,11 +7,11 @@
 # # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 # #
 #
-$(eval $(call gb_Package_Package,helpcontent2_html_lang,$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)))
+$(eval $(call gb_AllLangPackage_AllLangPackage,helpcontent2_html_lang,$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)))
 
-$(eval $(call 
gb_Package_use_customtarget,helpcontent2_html_lang,helpcontent2/help3xsl))
+$(eval $(call 
gb_AllLangPackage_use_customtarget,helpcontent2_html_lang,helpcontent2/help3xsl))
 
-$(eval $(call 
gb_Package_add_files_with_dir,helpcontent2_html_lang,$(LIBO_SHARE_HELP_FOLDER)$(if
 $(HELP_ONLINE),/$(PRODUCTVERSION)),\
+$(eval $(call 
gb_AllLangPackage_add_files,helpcontent2_html_lang,$(LIBO_SHARE_HELP_FOLDER)$(if
 $(HELP_ONLINE),/$(PRODUCTVERSION)),\
        $(foreach lang,$(gb_HELP_LANGS),\
                $(lang)/bookmarks.js \
                $(lang)/contents.js \
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 5d913826c..e4c1626e5 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:
diff --git a/Module_helpcontent2.mk b/Module_helpcontent2.mk
index 2975af0ad..2f199d91d 100644
--- a/Module_helpcontent2.mk
+++ b/Module_helpcontent2.mk
@@ -16,11 +16,11 @@ $(eval $(call gb_Module_add_targets,helpcontent2,\
 
 ifeq ($(ENABLE_HTMLHELP),TRUE)
 $(eval $(call gb_Module_add_targets,helpcontent2,\
+       AllLangPackage_html_lang \
        CustomTarget_html \
        GeneratedPackage_html_lang_generated \
        GeneratedPackage_html_media \
        Package_html_dynamic \
-       Package_html_lang \
        Package_html_static \
 ))
 endif
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to