--- /dev/null
+# Refer to following asciidoc documentation:
+# http://www.methods.co.nz/asciidoc/userguide.html
+# In particular sections "Macros" and "Attribute References"
+#
+# For hyperlinks, show 'link text [URL]' (if link text provided) or 'URL'
+[http-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[https-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[ftp-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[file-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[irc-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[mailto-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+
+# Hide image representation from text manual
+[image-inlinemacro]
+{empty}
+[image-blockmacro]
+{empty}
+++ /dev/null
-# Refer to following asciidoc documentation:
-# http://www.methods.co.nz/asciidoc/userguide.html
-# In particular sections "Macros" and "Attribute References"
-#
-# For hyperlinks, show 'link text [URL]' (if link text provided) or 'URL'
-[http-inlinemacro]
-{0=}{0? [}{name}:{target}{0?]}
-[https-inlinemacro]
-{0=}{0? [}{name}:{target}{0?]}
-[ftp-inlinemacro]
-{0=}{0? [}{name}:{target}{0?]}
-[file-inlinemacro]
-{0=}{0? [}{name}:{target}{0?]}
-[irc-inlinemacro]
-{0=}{0? [}{name}:{target}{0?]}
-[mailto-inlinemacro]
-{0=}{0? [}{name}:{target}{0?]}
-
-# Hide image representation from text manual
-[image-inlinemacro]
-{empty}
-[image-blockmacro]
-{empty}
GENDOC_XSLTPROC_IS_BROKEN = \
$(shell xsltproc --maxvars 0 >/dev/null 2>/dev/null || echo y)
+# Apply this configuration to all documents
+BR_ASCIIDOC_CONF = docs/conf/asciidoc.conf
+
################################################################################
# ASCIIDOC_INNER -- generates the make targets needed to build a specific type of
# asciidoc documentation.
$(1)-check-dependencies-$(5): asciidoc-check-dependencies-$(5)
$$(Q)$$(foreach hook,$$($(2)_CHECK_DEPENDENCIES_$$(call UPPERCASE,$(5))_HOOKS),$$(call $$(hook))$$(sep))
+# Include Buildroot's AsciiDoc configuration first:
+# - generic configuration,
+# - then output-specific configuration
+ifneq ($$(wildcard $$(BR_ASCIIDOC_CONF)),)
+$(2)_$(4)_ASCIIDOC_OPTS += -f $$(BR_ASCIIDOC_CONF)
+endif
+BR_$(4)_ASCIIDOC_CONF = docs/conf/asciidoc-$(4).conf
+ifneq ($$(wildcard $$(BR_$(4)_ASCIIDOC_CONF)),)
+$(2)_$(4)_ASCIIDOC_OPTS += -f $$(BR_$(4)_ASCIIDOC_CONF)
+endif
+
+# Then include the document's AsciiDoc configuration:
+# - generic configuration,
+# - then output-specific configuration
ifneq ($$(wildcard $$($(2)_ASCIIDOC_CONF)),)
$(2)_$(4)_ASCIIDOC_OPTS += -f $$($(2)_ASCIIDOC_CONF)
endif
-
$(2)_$(4)_ASCIIDOC_CONF = $(3)/asciidoc-$(4).conf
ifneq ($$(wildcard $$($(2)_$(4)_ASCIIDOC_CONF)),)
$(2)_$(4)_ASCIIDOC_OPTS += -f $$($(2)_$(4)_ASCIIDOC_CONF)