From 3e0fb08cce8581d5d10fc5f0e44a26451bf5b794 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Tue, 12 May 2020 16:56:00 -0300 Subject: tdf#128519 Icon replacement table in build time As explained in tdf#128519, command in XLST must have its href= hardcoded. Thus, copy online_transform.xsl and create links.txtx.xsl in workdir/ Change-Id: I979fd58f16a51ae6f57fc6f87349700eafdefbd7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94082 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- CustomTarget_html.mk | 18 ++++++++++++------ help3xsl/online_transform.xsl | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index cd53b9c6a3..ba0f731021 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -155,8 +155,14 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \ $(TREE_FILE) \ ) -# link txt file for icon replacement table -$(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \ +# link txt file for icon replacement table - tdf#128519 +# copy online_transform.xsl to workdir and build links.txt.xsl +$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) : \ + $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl + cp $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl $@ + +$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) : \ + $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) \ $(SRCDIR)/icon-themes/colibre/links.txt \ $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py \ $(call gb_ExternalExecutable_get_dependencies,python) @@ -164,7 +170,7 @@ $(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \ define html_gen_html_dep $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \ - $(SRCDIR)/helpcontent2/helpers/links.txt.xsl \ + $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) \ $(foreach module,$(html_TEXT_MODULES), \ $(if $(filter en-US,$(1)), \ $(call gb_AllLangHelp_get_helpfiles_target,$(module)), \ @@ -175,7 +181,7 @@ endef $(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_html_dep,$(lang)))) $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \ - $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \ + $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/links.txt.xsl) \ $(call gb_ExternalExecutable_get_dependencies,xsltproc) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1) $(call gb_Helper_abbreviate_dirs,\ @@ -193,14 +199,14 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \ --stringparam productversion "$(PRODUCTVERSION)" \ --stringparam xapian $(if $(filter TRUE, $(HELP_OMINDEX_PAGE)),'yes','no') \ -o $(dir $@)$${xhp%.xhp}.html \ - $(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \ + $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/online_transform.xsl) \ $(if $(filter WNT,$(OS)),$$(cygpath -m `pwd`),`pwd`)/$$xhp \ || exit \ ; done \ && rm "$$RESPONSEFILE" \ && touch $@ \ ) - + $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js : $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2) $(call gb_Helper_abbreviate_dirs,\ diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 62e0e976c4..573967c192 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -21,7 +21,7 @@ - +