summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--docs/man5/Makefile.am8
-rw-r--r--docs/man8/Makefile.am8
3 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 6ddbcc0..623d9a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/docs/man5/Makefile.am b/docs/man5/Makefile.am
index 247b7ef..48e5b03 100644
--- a/docs/man5/Makefile.am
+++ b/docs/man5/Makefile.am
@@ -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 = \
diff --git a/docs/man8/Makefile.am b/docs/man8/Makefile.am
index 1bd0ffa..5e2f390 100644
--- a/docs/man8/Makefile.am
+++ b/docs/man8/Makefile.am
@@ -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 = \