diff --git a/package/doc-asciidoc.mk b/package/doc-asciidoc.mk index 2bd761edfb..931c5136d4 100644 --- a/package/doc-asciidoc.mk +++ b/package/doc-asciidoc.mk @@ -86,11 +86,13 @@ ifneq ($$(wildcard $$($(2)_$(3)_ASCIIDOC_CONF)),) $(2)_$(3)_ASCIIDOC_OPTS += -f $$($(2)_$(3)_ASCIIDOC_CONF) endif +$(2)_$(3)_A2X_OPTS = \ + --xsltproc-opts "--stringparam toc.section.depth 1" + # Handle a2x warning about --destination-dir option only applicable to HTML # based outputs. So: # - use the --destination-dir option if possible (html and split-html), # - otherwise copy the generated document to the output directory -$(2)_$(3)_A2X_OPTS = ifneq ($$(filter $(4),html split-html),) $(2)_$(3)_A2X_OPTS += --destination-dir="$$(@D)" else @@ -161,11 +163,9 @@ $(1)-prepare-sources: $$(BUILD_DIR)/docs/$(1)/.stamp_doc_rsynced $(2)_ASCIIDOC_CONF = $$($(2)_DOCDIR)/asciidoc.conf -$(call ASCIIDOC_INNER,$(1),$(2),xhtml,html,html,HTML,\ - --xsltproc-opts "--stringparam toc.section.depth 1") +$(call ASCIIDOC_INNER,$(1),$(2),xhtml,html,html,HTML) -$(call ASCIIDOC_INNER,$(1),$(2),chunked,split-html,chunked,split HTML,\ - --xsltproc-opts "--stringparam toc.section.depth 1") +$(call ASCIIDOC_INNER,$(1),$(2),chunked,split-html,chunked,split HTML) # dblatex needs to pass the '--maxvars ...' option to xsltproc to prevent it # from reaching the template recursion limit when processing the (long) target