]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: (asciidoctor) explicitly require extensions module
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 31 May 2023 15:12:12 +0000 (17:12 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 31 May 2023 16:14:28 +0000 (18:14 +0200)
This is needed for older versions of asciidoctor.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
configure.ac
tools/asciidoctor-includetracker.rb
tools/asciidoctor-unicodeconverter.rb

index c80ef7bded10973ba7f5018e049ad3695cf8fcee..7de254c2d531f07bd706f0d6e33de8e3e44ba0eb 100644 (file)
@@ -805,16 +805,17 @@ AC_ARG_ENABLE([asciidoc],
 UL_BUILD_INIT([asciidoc])
 UL_REQUIRES_PROGRAM([asciidoc], [ASCIIDOCTOR], [asciidoctor], [man pages])
 AM_CONDITIONAL([ENABLE_ASCIIDOC], [test "x$build_asciidoc" = xyes])
+have_asciidoctor_failure_level=no
 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])
+         have_asciidoctor_failure_level=yes
        ], [
          AC_MSG_RESULT([no])
-         AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [false])
        ])
 ])
+AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [test "x$have_asciidoctor_failure_level" = xyes])
 
 have_manpages=no
 AS_IF([test -f "$srcdir/sys-utils/mount.8"], [
index 75a9e5b568101bc575af716f4b10554bb57c166c..bcf9ce0302246acfb1e598fe32f13ae0803d9e16 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
 # Extensions for asciidoctor to write dependency files for include directives.
 
+require 'asciidoctor/extensions'
+
 module IncludeTracker
 
   class Preprocessor < Asciidoctor::Extensions::Preprocessor
index 4983ee5c6455bba3b49e14747ef4c1fd031dc287..7b90bd3722502584694b33fa975eb338789b00f9 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
 # Extension for asciidoctor to remove unicode dash in first section of manpage
 
+require 'asciidoctor/extensions'
+
 module UnicodeConverter
   BEFORE_NAME_SECTION = 1
   IN_NAME_SECTION = 2