]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: manpages: Strip table of contents from manpages
authorPeter Krempa <pkrempa@redhat.com>
Wed, 23 Sep 2020 13:13:57 +0000 (15:13 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 23 Sep 2020 14:20:36 +0000 (16:20 +0200)
After meson conversion the man pages started to contain the table of
contents.

In autoconf we prevented this by a 'grep -v ::contents' in the command
building the manpages.

A more cultured solution is to strip out the 'contents' docutils element
directly.

Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/manpages/meson.build

index 3888bb8efef9749a01d0e358d13dd313dfb7e4f5..7ed1d304a4e6e40f3a5f42db78026272b3f782df 100644 (file)
@@ -89,7 +89,8 @@ foreach data : docs_man_files
       man_file,
       input: rst_file,
       output: man_file,
-      command: [ rst2man_prog, '--strict', '@INPUT@', '@OUTPUT@' ],
+      # 'contents' element is the table of contents which is undesired in manpage
+      command: [ rst2man_prog, '--strip-elements-with-class', 'contents', '--strict', '@INPUT@', '@OUTPUT@' ],
       install: true,
       install_dir: mandir / 'man@0@'.format(data['section']),
     )