diff options
Diffstat (limited to 'CustomTarget_html.mk')
-rw-r--r-- | CustomTarget_html.mk | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index 7c6ed744da..46068e82b0 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -38,9 +38,6 @@ $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\ ) \ )) -# In the below recipe, the file $@.good is used to communicate failure of xsltproc in the pipeline -# (similar to Bash's `set -o pipefail`; the final `rm $@.good` will fail, and fail the whole -# command, if the xsltproc invocation failed): $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \ $(SRCDIR)/helpcontent2/help3xsl/generate_hid2file.xsl \ $(call gb_ExternalExecutable_get_dependencies,xsltproc) \ @@ -49,15 +46,9 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \ $(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 = {' \ - && RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(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 \ - rm -f $@.good && \ - { $(call gb_ExternalExecutable_get_command,xsltproc) $< $$xhp && touch $@.good; } \ - | $(gb_AWK) 'NF' \ - && rm $@.good || exit \ - ; done \ + && cd $(SRCDIR) && xargs $(call gb_ExternalExecutable_get_command,xsltproc) $< <$$RESPONSEFILE || { rm $$RESPONSEFILE; exit 1 ; } \ && rm "$$RESPONSEFILE" \ && echo '};' \ ) > $@ \ |