btrfs-progs: build: drop asciidoc detection, default to sphinx

Make sphinx the default build tool, remove asciidoc target selection.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-01-13 18:29:42 +01:00
parent 2e0c6ca308
commit 45d4edaf97
2 changed files with 11 additions and 34 deletions

View file

@ -1,4 +1,4 @@
ifeq (@ASCIIDOC_TOOL@,sphinx)
ifeq (@DOC_TOOL@,sphinx)
# Source files for manual pages are listed in conf.py in variable man_pages
@ -118,14 +118,14 @@ man8dir = $(mandir)/man8
XMLTO = @XMLTO@
XMLTO_EXTRA = -m manpage-bold-literal.xsl
ifeq (@ASCIIDOC_TOOL@,asciidoc)
ifeq (@DOC_TOOL@,asciidoc)
ASCIIDOC = @ASCIIDOC@
ASCIIDOC_ARGS = -abtrfs_version=$(BTRFS_VERSION) -f asciidoc.conf
ASCIIDOC_HTML = html
ASCIIDOC_DOCBOOK = docbook
ASCIIDOC_DEPS = asciidoc.conf
endif
ifeq (@ASCIIDOC_TOOL@,asciidoctor)
ifeq (@DOC_TOOL@,asciidoctor)
ASCIIDOC = @ASCIIDOCTOR@
ASCIIDOC_ARGS = -abtrfs_version=$(BTRFS_VERSION)
ASCIIDOC_HTML = xhtml5

View file

@ -108,42 +108,19 @@ AC_ARG_ENABLE([documentation],
AS_IF([test "x$enable_documentation" = xyes], [DISABLE_DOCUMENTATION=0], [DISABLE_DOCUMENTATION=1])
AC_SUBST([DISABLE_DOCUMENTATION])
dnl Workaround to allow to select sphinx and build the RST documentation until
dnl it's default and without introducing temporary --with option
dnl Use as: $ ASCIIDOC_TOOL ./configure
if test "x$ASCIIDOC_TOOL" = "xsphinx"; then
ASCIIDOC_TOOL='sphinx'
dnl detect tools to build documentation
DOC_TOOL="none"
if test "x$enable_documentation" = xyes; then
DOC_TOOL='sphinx'
AC_PATH_PROG([SPHINX], [sphinx-build])
AC_PATH_PROG([MV], [mv], [mv])
AC_PROG_SED
else
dnl detect tools to build documentation
ASCIIDOC_TOOL="none"
if test "x$enable_documentation" = xyes; then
AC_PATH_PROG([XMLTO], [xmlto])
if test -z "$XMLTO"; then
AC_MSG_ERROR([cannot find xmlto, cannot build documentation])
fi
AC_PATH_PROG([MV], [mv], [mv])
AC_PROG_SED
AC_PATH_PROG([ASCIIDOC], [asciidoc])
AC_PATH_PROG([ASCIIDOCTOR], [asciidoctor])
dnl asciidoc is preferred
if test -n "$ASCIIDOC"; then
ASCIIDOC_TOOL="asciidoc"
else
if test -n "$ASCIIDOCTOR"; then
ASCIIDOC_TOOL="asciidoctor"
else
AC_MSG_ERROR([cannot find asciidoc or asciidoctor, cannot build documentation])
fi
if test -z "$SPHINX"; then
AC_MSG_ERROR([cannot find sphinx-build, cannot build documentation])
fi
fi
fi
AC_SUBST([ASCIIDOC_TOOL])
AC_SUBST([DOC_TOOL])
AC_ARG_ENABLE([programs],
AS_HELP_STRING([--disable-programs], [do not build utility programs]),
@ -456,7 +433,7 @@ AC_MSG_RESULT([
shared libraries: ${enable_shared}
static libraries: ${enable_static}
documentation: ${enable_documentation}
doc generator: ${ASCIIDOC_TOOL}
doc generator: ${DOC_TOOL}
backtrace support: ${enable_backtrace}
btrfs-convert: ${enable_convert} ${convertfs:+($convertfs)}
btrfs-restore zstd: ${enable_zstd}