Skip to content

Commit

Permalink
documentation: Makefile: always build using asciidoctor (remove a2x)
Browse files Browse the repository at this point in the history
Remove support for man page generation using asciidoc "a2x": The
project is discontinued, and depends on Python 2.7.

As we will provide pre-generated man pages as of btrbk-0.28.0, this is
not needed any more.
  • Loading branch information
digint committed Apr 24, 2019
1 parent d231a95 commit 173319e
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,8 @@ ifeq ($(COMPRESS), yes)
endif

# convert using "asciidoctor": <https://asciidoctor.org>
# fallback to "a2x" from asciidoc package: <http://asciidoc.org>
ifneq (, $(shell command -v asciidoctor 2> /dev/null))
ASCIIDOC_MANPAGE = asciidoctor -d manpage -b manpage
ASCIIDOC_HTML = asciidoctor -b html5 -d article
else ifneq (, $(shell command -v a2x 2> /dev/null))
# NOTE: using -L (--no-xmllint), as xmllint is a separate package on many distros.
ASCIIDOC_MANPAGE = a2x -L -d manpage -f manpage
ASCIIDOC_HTML = asciidoc -b html -d article
else
ASCIIDOC_ERR = $(error "please install either asciidoc or asciidoctor")
ASCIIDOC_MANPAGE = $(ASCIIDOC_ERR)
ASCIIDOC_HTML = $(ASCIIDOC_ERR)
endif
ASCIIDOCTOR_MANPAGE = asciidoctor -d manpage -b manpage
ASCIIDOCTOR_HTML = asciidoctor -b html5 -d article


all: man
Expand All @@ -58,10 +47,10 @@ clean:
gzip -9 -n -c $< > $@

%.1 : %.1.asciidoc
$(ASCIIDOC_MANPAGE) $<
$(ASCIIDOCTOR_MANPAGE) -o $@ $<

%.5 : %.5.asciidoc
$(ASCIIDOC_MANPAGE) $<
$(ASCIIDOCTOR_MANPAGE) -o $@ $<

%.html : %.asciidoc
$(ASCIIDOC_HTML) -o $@ $<
$(ASCIIDOCTOR_HTML) -o $@ $<

0 comments on commit 173319e

Please sign in to comment.