CustomTarget_html.mk |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5daaa3e440b17505d644273a7305f073d6d5834d
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Thu Dec 15 16:35:31 2022 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Thu Dec 15 21:04:03 2022 +0000

    cd to helpcontent2/source/text & drop it from filenames for larger batches
    
    On the Jenkins Windows builder only 40~45 of the ~2500 helpfiles can be
    processed at once when not stripping that prefix. With the shortened
    filenames the build needs less than half of the xsltproc invocations.
    
    Also prevent a trailing carriage return to be interpreted as part of the
    filename on windows and drop the abbreviate_dir wrapper around the
    command since there's nothing left to shorten anymore.
    
    Change-Id: Ifaff26f73f262bd1d7cb4f813bf081782661ba17
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144236
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 8db68cf8c1..e8fd4b439d 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -38,21 +38,21 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
        ) \
 ))
 
+# trailing space for Windows so that xargs doesn't interpret the final CR (that
+# win-make adds as the newline character) as part of the last filename
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
                $(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \
                $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
                $(foreach module,$(html_TEXT_MODULES),$(call 
gb_AllLangHelp_get_helpfiles_target,$(module))) \
                $(SRCDIR)/helpcontent2/CustomTarget_html.mk
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
-       $(call gb_Helper_abbreviate_dirs,\
-               ( \
-                       RESPONSEFILE=$(call gb_var2file,$(shell 
$(gb_MKTEMP)),$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES)))  && \
-                       echo 'var hid2fileMap = {' \
-                       && cd $(SRCDIR) && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
-                       && rm "$$RESPONSEFILE" \
-                       && echo '};' \
-               ) > $@ \
-       )
+       ( \
+               RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst 
helpcontent2/source/text/,,$(foreach 
module,$(html_TEXT_MODULES),$(gb_AllLangHelp_$(module)_HELPFILES))$(if $(filter 
WNT,$(OS), )))  && \
+               echo 'var hid2fileMap = {' \
+               && cd $(SRCDIR)/helpcontent2/source/text && $(call 
gb_ExternalExecutable_get_command,xsltproc,xargs) $< <$$RESPONSEFILE || { rm 
$$RESPONSEFILE; exit 1 ; } \
+               && rm "$$RESPONSEFILE" \
+               && echo '};' \
+       ) > $@
 
 
 # Xapian localized templates

Reply via email to