From a0fe78cfdc086879e41f5980bb1679b4514f3e61 Mon Sep 17 00:00:00 2001 From: f18m Date: Tue, 31 Oct 2023 15:58:21 +0100 Subject: [PATCH] Fix compat issue with Asciidoctor 1.5.8 used by Debian10 --- doc/Makefile.am | 12 +++++++++--- doc/zmq.adoc | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index de710d3ab5..b6c1c4df20 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -51,12 +51,18 @@ EXTRA_DIST += $(MAN_HTML) $(MAN_DOC) MAINTAINERCLEANFILES += $(MAN_HTML) $(MAN_DOC) SUFFIXES=.html .adoc .3 .7 + +# NOTE: libzmq CI runs on some "old" distribution that ships Asciidoctor 1.5.x which has +# some small incompatibility with Asciidoctor 2.x; in particular 2.x exposes automatically +# the "backend" attribute that can be used inside .adoc documents; 1.5.x did not, so we +# provide the "zmq_output_format" attribute as compat alternative to "backend" built-in attribute + .adoc.html: - asciidoctor -b html -azmq_version=@PACKAGE_VERSION@ $< + asciidoctor --backend html --attribute zmq_output_format=html --attribute zmq_version=@PACKAGE_VERSION@ $< .adoc.3: - asciidoctor -b manpage -azmq_version=@PACKAGE_VERSION@ $< + asciidoctor --backend manpage --attribute zmq_output_format=manpage --attribute zmq_version=@PACKAGE_VERSION@ $< .adoc.7: - asciidoctor -b manpage -azmq_version=@PACKAGE_VERSION@ $< + asciidoctor --backend manpage --attribute zmq_output_format=manpage --attribute zmq_version=@PACKAGE_VERSION@ $< dist-hook : $(MAN_DOC) $(MAN_HTML) diff --git a/doc/zmq.adoc b/doc/zmq.adoc index c82bcdd91b..9eee03162b 100644 --- a/doc/zmq.adoc +++ b/doc/zmq.adoc @@ -1,4 +1,4 @@ -ifeval::["{backend}" == "manpage"] +ifeval::["{zmq_output_format}" == "manpage"] = zmq(7) @@ -11,7 +11,7 @@ zmq - 0MQ lightweight messaging kernel, version {zmq_version} *cc* ['flags'] 'files' *-lzmq* ['libraries'] endif::[] -ifeval::["{backend}" != "manpage"] +ifeval::["{zmq_output_format}" != "manpage"] = ZMQ API Reference endif::[]