[PATCH 1/2] perf docs: Fix build with asciidoctor

Ben Hutchings posted 2 patches 10 months, 3 weeks ago
[PATCH 1/2] perf docs: Fix build with asciidoctor
Posted by Ben Hutchings 10 months, 3 weeks ago
Currently we unconditionally add "--unsafe -f asciidoc.conf" to
ASCIIDOC_EXTRA, but asciidoctor doesn't support these options.

Make all the ASCIIDOC_* variable assignments conditional on whether
USE_ASCIIDOCTOR is set.

Fixes: e9cfa47e687d ("perf doc: allow ASCIIDOC_EXTRA to be an argument")
Signed-off-by: Ben Hutchings <benh@debian.org>
---
 tools/perf/Documentation/Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index 4407b106d977..f566e3e98c22 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -44,17 +44,11 @@ man1dir=$(mandir)/man1
 man5dir=$(mandir)/man5
 man7dir=$(mandir)/man7
 
+ifndef USE_ASCIIDOCTOR
 ASCIIDOC=asciidoc
 ASCIIDOC_EXTRA += --unsafe -f asciidoc.conf
 ASCIIDOC_HTML = xhtml11
-MANPAGE_XSL = manpage-normal.xsl
-XMLTO_EXTRA =
-INSTALL?=install
-RM ?= rm -f
-DOC_REF = origin/man
-HTML_REF = origin/html
-
-ifdef USE_ASCIIDOCTOR
+else
 ASCIIDOC = asciidoctor
 ASCIIDOC_EXTRA += -a compat-mode
 ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
@@ -62,6 +56,13 @@ ASCIIDOC_EXTRA += -a mansource="perf" -a manmanual="perf Manual"
 ASCIIDOC_HTML = xhtml5
 endif
 
+MANPAGE_XSL = manpage-normal.xsl
+XMLTO_EXTRA =
+INSTALL?=install
+RM ?= rm -f
+DOC_REF = origin/man
+HTML_REF = origin/html
+
 infodir?=$(prefix)/share/info
 MAKEINFO=makeinfo
 INSTALL_INFO=install-info