[CRIU] [PATCH v2 2/2] Documentation: Allow to use asciidoctor for formatting man pages
Takashi Iwai
tiwai at suse.de
Wed Jan 16 19:43:31 MSK 2019
On Wed, 16 Jan 2019 17:37:26 +0100,
Dmitry Safonov wrote:
>
> On Wed, 16 Jan 2019 at 16:16, Takashi Iwai <tiwai at suse.de> wrote:
> >
> > Since asciidoc is based on Phyton 2, we want to move to alternative,
> > and a promising one is asciidoctor. This patch allows to use
> > asciidoctor for formatting man pages instead of asiidoc, by passing
> > a make option, USE_ASCIIDOCTOR=yes.
> >
> > Although asciidoctor is almost compatible with asciidoc, it can
> > produce a man page directly from a text file without XML, which is
> > more efficiently. So in asciidoctor mode, we don't require xmlto.
> >
> > Signed-off-by: Takashi Iwai <tiwai at suse.de>
> > ---
>
> [..]
>
> > +ifneq ($(USE_ASCIIDOCTOR),)
> > + $(Q) $(ASCIIDOC) -b manpage -d manpage -o $@ $<
> > +else
> > $(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.1,%.xml,$@) $<
> > $(Q) $(XMLTO) man -m custom.xsl $(patsubst %.1,%.xml,$@) 2>/dev/null
> > +endif
>
> Can we remove this ifneq's?
> Like, can those call details go inside $(ASCIIDOC)?
> And to define ASCIIDOC: if asciidoctor is installed, use it. Fallback
> to asciidoc if not installed.
> So, no one will need to set USE_ASCIIDOCTOR somewhere.
Well, asciidoctor doesn't need xmlto but it can translate directly to
the man page from a text file. So it's not only about the difference
of invocation options.
Admittedly these scattered ifdef's are ugly, and it'd be appreciated
if you have a better idea to write in a cleaner way.
thanks,
Takashi
More information about the CRIU
mailing list