add support for asciidoctor to generate manpages

asciidoctor is a modern replacement for asciidoc and much more lightweight,
issuing "apt-get install asciidoc" on ubuntu 16.04 results in an attempt to
install more than 1.3 GB of dependencies.
This commit is contained in:
rofl0r 2020-08-11 14:52:16 +01:00
parent 0b9a74c290
commit c2d4114427
3 changed files with 19 additions and 3 deletions

View File

@ -181,6 +181,10 @@ AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
AC_PATH_PROG(A2X, a2x, no)
AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
# Check for asciidoctor
AC_PATH_PROG(ASCIIDOCTOR, asciidoctor, no)
AM_CONDITIONAL(HAVE_ASCIIDOCTOR, test "x$ASCIIDOCTOR" != "xno")
# checking xmllint
AC_PATH_PROG(XMLLINT, xmllint, no)
if test "x$XMLLINT" != "xno"; then
@ -221,7 +225,7 @@ AC_OUTPUT
# runtime, so we need to touch them after config.status terminated to prevent
# make from rebuild them.
if test "x$A2X" = "xno"; then
if test "x$A2X" = "xno" -a "x$HAVE_ASCIIDOCTOR" = "xno" ; then
touch docs/man5/tinyproxy.conf.txt
touch docs/man8/tinyproxy.txt
if test -e docs/man5/tinyproxy.conf.5 ; then

View File

@ -7,6 +7,8 @@ else
A2X_ARGS = -d manpage -f manpage -L
endif
ASCIIDOCTOR_ARGS = -b manpage
man_MANS = \
$(MAN5_FILES:.txt=.5)
@ -14,7 +16,11 @@ man_MANS = \
if HAVE_A2X
$(AM_V_GEN) $(A2X) $(A2X_ARGS) $<
else
@echo "*** a2x (asciidoc) is required to regenerate $(@) ***"; exit 1;
if HAVE_ASCIIDOCTOR
$(AM_V_GEN) $(ASCIIDOCTOR) $(ASCIIDOCTOR_ARGS) $<
else
@echo "*** a2x (asciidoc) or asciidoctor is required to regenerate $(@) ***"; exit 1;
endif
endif
CLEANFILES = \

View File

@ -7,6 +7,8 @@ else
A2X_ARGS = -d manpage -f manpage -L
endif
ASCIIDOCTOR_ARGS = -b manpage
man_MANS = \
$(MAN8_FILES:.txt=.8)
@ -14,7 +16,11 @@ man_MANS = \
if HAVE_A2X
$(AM_V_GEN) $(A2X) $(A2X_ARGS) $<
else
@echo "*** a2x (asciidoc) is required to regenerate $(@) ***"; exit 1;
if HAVE_ASCIIDOCTOR
$(AM_V_GEN) $(ASCIIDOCTOR) $(ASCIIDOCTOR_ARGS) $<
else
@echo "*** a2x (asciidoc) or asciidoctor is required to regenerate $(@) ***"; exit 1;
endif
endif
CLEANFILES = \