summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2023-07-25 13:07:29 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2024-04-22 13:38:06 +0200
commitb066c7f1008ce7d433683324dc9ef441478c832c (patch)
tree7b5eea1ba6720a8548b6f0cf491387c890090dc1
parent183a14d99cbf6b18fa7d3d059a2ff0639520a205 (diff)
win doesn't like (foo || bar) | … construct, suspends xsltproc
not always/reproducible but often enough when using git-bash to get annoying when building with all langs/when that is run in parallel Splitting this up makes it more reliable (or I just have been lucky) btw: why is this split-per-app when the final bookmarks.js is a simple concatenation of all of them? Change-Id: I629a302237b32da8ba77460e0415f32d50105ae5 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166320 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--CustomTarget_html.mk18
1 files changed, 12 insertions, 6 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index a3a9cec55f..00808bdf92 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -278,26 +278,32 @@ html_gen_bookmarks_deps = $(call html__gen_bookmarks_deps,$(firstword $(1)),$(la
$(eval $(foreach module,$(html_BMARK_MODULES),$(call html_gen_bookmarks_deps,$(subst :, ,$(module)))))
+# intermediate responsefile target, make will clear those automatically
+# unless they are explicitly listed as target or non-pattern prerequisite
+# depend on the online_transform.xsl just as a proxy to make sure the directory exists
+# is only interemdiate because those were used as temp files previously - could just
+# as well be plain/explicit targets
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%_bookmarks.part.responsefile:| $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/online_transform.xsl
+ $(file > $@,$(subst helpcontent2/source/text/,,$(gb_AllLangHelp_$*_BOOKMARK_HELPFILES))$(if $(filter WNT,$(OS)), ))
+
# strip the helpcontent2/source/text prefix and cd to the corresponding directory to maximize
# the number of files that xargs can squeeze into a single invocation of xsltproc
$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
$(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
+ $(foreach module,$(html_TREE_MODULES),$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(module)_bookmarks.part.responsefile) \
| $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Trace_StartRange,$*/$(@F),XSL)
- RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(subst helpcontent2/source/text/,,$(gb_AllLangHelp_$(APPDIR)_BOOKMARK_HELPFILES))$(if $(filter WNT,$(OS)), )) \
- && cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
- && ( \
- $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs) \
+ cd $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text \
+ && $(call gb_ExternalExecutable_get_command,xsltproc,$(if $(filter WNT,$(OS)),env -i $(gb_Helper_set_ld_path)) xargs -a $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(firstword $(subst /, ,$*))_bookmarks.part.responsefile) \
--stringparam app $(APP) \
--stringparam Language $(HELP_LANG) \
--stringparam local $(if $(HELP_ONLINE),'no','yes') \
--stringparam productname "$(gb_PRODUCTNAME_HTML)" \
--stringparam productversion "$(PRODUCTVERSION)" \
$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
- <$$RESPONSEFILE || { rm $$RESPONSEFILE; exit 1; } \
- ) | sort -k3b -s >$@ && rm "$$RESPONSEFILE"
+ | sort -k3b -s >$@
$(call gb_Trace_EndRange,$*/$(@F),XSL)
# The various gid_File_Help_*_Zip in scp2 that use EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG expect