From db64016fc4100bf7cc88647560b1e3c5fcb53b4e Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 14 Aug 2018 16:13:34 +0200 Subject: Rename 'map' to 'hid2fileMap'. Also update dependency, so that the file gets rebuilt when the 'echo' part of the makefile changes. Change-Id: I0412f882dd12e265d8261a259ed83c469e261cdf Reviewed-on: https://gerrit.libreoffice.org/58992 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky --- CustomTarget_html.mk | 5 +++-- help3xsl/index2.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index a8447e4fe2..58f7b7aaf2 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -29,11 +29,12 @@ $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\ $(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))) + $(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,\ ( \ - echo 'var map={' \ + echo 'var hid2fileMap = {' \ && RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(foreach module,$(html_TEXT_MODULES),$(addprefix $(SRCDIR)/,$(gb_AllLangHelp_$(module)_HELPFILES)))) \ && <"$$RESPONSEFILE" $(if $(filter WNT,$(OS)),tr -d '\r' | env -i PATH="$$PATH") xargs -n 1 printf '%s\n' \ | while read xhp; do \ diff --git a/help3xsl/index2.html b/help3xsl/index2.html index 4f7c744e27..6a9a1a6c8e 100644 --- a/help3xsl/index2.html +++ b/help3xsl/index2.html @@ -36,11 +36,11 @@ default: {defaultFile='text/shared/main0000.html';module="WRITER";break;} } var bookmark = target.slice(target.indexOf('/') + 1, target.length); - var file = map[bookmark]; + var file = hid2fileMap[bookmark]; // check first if a root bookmark @@nowidget@@ can be used if (file === undefined) { var b2 = bookmark.substring(0, bookmark.lastIndexOf("/")) + '/@@nowidget@@'; - file = map[b2]; + file = hid2fileMap[b2]; } // rebuild URL if (file === undefined) { -- cgit