git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] INSTALL: note about make man with Asciidoctor backend

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2021, 07:00 UTC
Message-ID
<xmqqtun8fncl.fsf@gitster.g>
In-Reply-To
<20210512064128.15411-1-bagasdotme@gmail.com>
Bagas Sanjaya <bagasdotme@gmail.com> writes:
Show 11 quoted lines
> "make man" can now be also done with Asciidoctor's manpage backend
> instead of asciidoc+xmlto.
>
> Update INSTALL to reflect that.
>
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>
>  This patch is based on  "doc: add an option to have Asciidoctor build
>  man pages directly" series by brian m. carlson [1]. It can be added
>  to that series.

It's not like "can be"; it would not make any sense to queue this patch before queuing those two patches below it ;-)

Not everybody with Asciidoctor can do the "man" without xmlto; they must have recent enough vintage of Asciidoctor, or they need xmlto. The second hunk makes it quite clear, but the updated text in the first hunk falls a bit short to convey that and needs a bit more work to clarify, I would think.

Show 13 quoted lines
> diff --git a/INSTALL b/INSTALL
> index 66389ce059..89e31566c3 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -184,8 +184,9 @@ Issues of note:
>  
>     "make doc" builds documentation in man and html formats; there are
>     also "make man", "make html" and "make info". Note that "make html"
> -   requires asciidoc, but not xmlto. "make man" (and thus make doc)
> -   requires both.
> +   requires asciidoc, but not xmlto. "make man" requires either
> +   Asciidoctor or asciidoc+xmlto. "make doc" requires both asciidoc
> +   and xmlto.
As "make doc" is "make -C Documentaiton all",
   "make html" is "make -C Documentaiton html",
   "make man" is "make -C Documentaiton man",
and 
   "make -C Documentation all" is "make -C Documentation html man"

it seems that those who choose to go xmlto-less route for manpages should not need xmlto while doing "make doc", so the last part of the updated text is not quite accurate, no?

Show 9 quoted lines
> @@ -201,6 +202,11 @@ Issues of note:
>     use Asciidoctor (requires Ruby) by passing USE_ASCIIDOCTOR=YesPlease
>     to make. You need at least Asciidoctor version 1.5.
>  
> +   You can also do "make man" using Asciidoctor's manpage backend in
> +   place of xmlto by passing USE_ASCIIDOCTOR_MANPAGE=YesPlease. Version
> +   2.0 or later is highly recommended, as these version properly handle
> +   apostrophes.
> +

Hmph, I wasn't closely following the previous discussion, but is the apostrophes the primary reason why anything below 2.0 is not usable?

I actually do not mind, for clarity and brevity's sake, to give readers a bit of white lie and just say something along the lines of

    If you use Asciidoctor version 2.0 or later, you can choose to
    directly generate manpages with its manpage backend, instaed of
    using xmlto in between, by passing USE_ASCIIDOCTOR_MANPAGE=YesPlease
    to "make man".

to _require_ 2.0 without even hinting that earlier versions might be usable.

In any case, thanks for a good start.
Previous: Bagas SanjayaNext: Felipe Contreras
Message 2 of 6 in “INSTALL: note about make man with Asciidoctor backend”
  1. INSTALL: note about make man with Asciidoctor backendBagas Sanjaya, May 12, 2021
  2. Junio C HamanoMay 12, 2021
  3. Felipe ContrerasMay 12, 2021
  4. Martin ÅgrenMay 13, 2021
  5. Junio C HamanoMay 13, 2021
  6. Felipe ContrerasJun 2, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.