Subject: Re: [PATCH] doc: use asciidoctor to build man pages directly

From: "brian m. carlson" <[email-masked]>
Date: Tue, 11 May 2021 23:26:48 +0000

On 2021-05-11 at 22:27:54, Felipe Contreras wrote:
> There's no need to use xmlto to build the man pages when modern
> asciidoctor can do it by itself.
> 
> This new mode will be active only when USE_ASCIIDOCTOR is set.
> 
> Suggested-by: Bagas Sanjaya <[email-masked]>
> Signed-off-by: Felipe Contreras <[email-masked]>
> ---
>  Documentation/Makefile | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 2aae4c9cbb..0cfa88a92b 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -196,6 +196,7 @@ ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
>  DBLATEX_COMMON =
>  XMLTO_EXTRA += --skip-validation
>  XMLTO_EXTRA += -x manpage.xsl
> +TXT_TO_MAN = $(ASCIIDOC_COMMON) -b manpage
>  endif

As I mentioned elsewhere, this breaks the linkgit functionality since we
don't have a patch for the asciidoctor-extensions.rb file and it also
doesn't honor GNU_ROFF, which means that copying and pasting from manual
pages is problematic on systems which use groff.

I'd prefer if we put this behind an option so that just because someone
like me who builds with Asciidoctor doesn't have to get this behavior.
We may by default enable that option if the issues I mentioned above are
addressed, but it would still be nice to have an option to enable the
legacy behavior, if only for those people who may be using older
versions of Asciidoctor.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US