linux-perf: Build docs using asciidoctor instead of asciidoc

This removes another Python 2 dependency.
This commit is contained in:
Ben Hutchings 2018-07-06 21:34:59 +01:00
parent 8b0549f036
commit afa20e4a35
5 changed files with 39 additions and 2 deletions

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
linux (4.18~rc3-1~exp2) UNRELEASED; urgency=medium
* Build docs using Python 3 version of Sphinx
* linux-perf: Build docs using asciidoctor
-- Ben Hutchings <ben@decadent.org.uk> Fri, 06 Jul 2018 20:55:47 +0100

View File

@ -0,0 +1,33 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 06 Jul 2018 21:29:17 +0100
Subject: perf Documentation: Fix non-deterministic Makefile rules
When USE_ASCIIDOCTOR is defined, we define a rule to convert from
asciidoc source directly to man pages is defined. However, the rule
to convert from XML to man pages using xmlto is always defined, and
make may still choose to use that. This means that using asciidoctor
does not remove the dependency on xmlto for building man pages, as
was intended.
Only define the second rule using xmlto if USE_ASCIIDOCTOR is not
defined.
Fixes: ffef80ecf89f ("perf Documentation: Support for asciidoctor")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -290,11 +290,11 @@ $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 :
$(ASCIIDOC) -b manpage -d manpage \
$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
mv $@+ $@
-endif
-
+else
$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
$(QUIET_XMLTO)$(RM) $@ && \
$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
+endif
$(OUTPUT)%.xml : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \

View File

@ -148,6 +148,7 @@ bugfix/all/tools-perf-man-date.patch
bugfix/all/tools-perf-remove-shebangs.patch
bugfix/all/tools-lib-traceevent-use-ldflags.patch
bugfix/x86/revert-perf-build-fix-libunwind-feature-detection-on.patch
bugfix/all/perf-documentation-fix-non-determinstic-makefile-rules.patch
bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch
bugfix/all/cpupower-bump-soname-version.patch
bugfix/all/cpupower-fix-checks-for-cpu-existence.patch

View File

@ -51,6 +51,9 @@ MAKE_PERF += NO_LIBCRYPTO=1
# Currently babeltrace support for `perf data' is not automatically detected.
MAKE_PERF += LIBBABELTRACE=1
# Build with asciidoctor, not asciidoc
MAKE_PERF += USE_ASCIIDOCTOR=1
all:
ifdef KERNEL_ARCH_PERF
# perf changes some default directories depending on whether DESTDIR is

View File

@ -28,8 +28,7 @@ Build-Depends-Arch:
libssl-dev:native <!stage1>, libssl-dev <!stage1 !pkg.linux.notools cross>,
openssl (>= 1.1.0-1~) <!stage1>,
# used by upstream to build perf documentation
asciidoc-base <!stage1 !nodoc !pkg.linux.notools>,
xmlto <!stage1 !nodoc !pkg.linux.notools>,
asciidoctor <!stage1 !nodoc !pkg.linux.notools>,
# used by upstream to build perf
gcc-multilib [amd64 ppc64 s390x sparc64] <!stage1 !pkg.linux.notools !nopython>,
libaudit-dev <!stage1 !pkg.linux.notools !nopython>,