]> 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>
Thu, 1 Jun 2023 10:16:34 +0000 (12:16 +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 6f0375eee3cadfb737efcf783d71a36a29b15c2f..591b62e3534db30e15518564101732b803ded00d 100644 (file)
@@ -802,16 +802,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