build-sys: only pass --failure-level if supported

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
This commit is contained in:
Thomas Weißschuh 2023-05-31 16:56:31 +02:00
parent 58c16c8442
commit 25a70dcb2e
3 changed files with 18 additions and 2 deletions

View file

@ -230,10 +230,13 @@ asciidoc_man_cmd = $(ASCIIDOCTOR) \
-a 'package-docdir=$(docdir)' \ -a 'package-docdir=$(docdir)' \
-a 'VERSION=$(VERSION)' \ -a 'VERSION=$(VERSION)' \
-a 'ADJTIME_PATH=$(ADJTIME_PATH)' \ -a 'ADJTIME_PATH=$(ADJTIME_PATH)' \
--failure-level ERROR \
--load-path '$(abs_srcdir)/tools' \ --load-path '$(abs_srcdir)/tools' \
--require asciidoctor-includetracker --require asciidoctor-includetracker
if HAVE_ASCIIDOCTOR_FAILURE_LEVEL
asciidoc_man_cmd += --failure-level ERROR
endif
SUFFIXES = .1.adoc .3.adoc .5.adoc .8.adoc .1 .3 .5 .8 SUFFIXES = .1.adoc .3.adoc .5.adoc .8.adoc .1 .3 .5 .8
.1.adoc.1 .3.adoc.3 .5.adoc.5 .8.adoc.8: .1.adoc.1 .3.adoc.3 .5.adoc.5 .8.adoc.8:
$(AM_V_GEN) test -f ./$@ || \ $(AM_V_GEN) test -f ./$@ || \

View file

@ -805,6 +805,16 @@ AC_ARG_ENABLE([asciidoc],
UL_BUILD_INIT([asciidoc]) UL_BUILD_INIT([asciidoc])
UL_REQUIRES_PROGRAM([asciidoc], [ASCIIDOCTOR], [asciidoctor], [man pages]) UL_REQUIRES_PROGRAM([asciidoc], [ASCIIDOCTOR], [asciidoctor], [man pages])
AM_CONDITIONAL([ENABLE_ASCIIDOC], [test "x$build_asciidoc" = xyes]) AM_CONDITIONAL([ENABLE_ASCIIDOC], [test "x$build_asciidoc" = xyes])
AS_IF([test "x$build_asciidoc" = xyes], [
AC_MSG_CHECKING([whether ${ASCIIDOCTOR} supports --failure-level])
AS_IF([${ASCIIDOCTOR} --help | grep failure-level >/dev/null 2>&1 ], [
AC_MSG_RESULT([yes])
AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [true])
], [
AC_MSG_RESULT([no])
AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [false])
])
])
have_manpages=no have_manpages=no
AS_IF([test -f "$srcdir/sys-utils/mount.8"], [ AS_IF([test -f "$srcdir/sys-utils/mount.8"], [

View file

@ -35,10 +35,13 @@ asciidoc_man_cmd = $(ASCIIDOCTOR) \
-a 'package-docdir=$(docdir)' \ -a 'package-docdir=$(docdir)' \
-a 'VERSION=$(VERSION)' \ -a 'VERSION=$(VERSION)' \
-a 'ADJTIME_PATH=$(ADJTIME_PATH)' \ -a 'ADJTIME_PATH=$(ADJTIME_PATH)' \
--failure-level ERROR \
--load-path '$(top_srcdir)/tools' \ --load-path '$(top_srcdir)/tools' \
--require asciidoctor-unicodeconverter --require asciidoctor-unicodeconverter
if HAVE_ASCIIDOCTOR_FAILURE_LEVEL
asciidoc_man_cmd += --failure-level ERROR
endif
gen-mans: gen-trans gen-mans: gen-trans
@set -e; \ @set -e; \
for l in $(PO_LANGS); do \ for l in $(PO_LANGS); do \