Skip to content

Commit

Permalink
Fix compat issue with Asciidoctor 1.5.8 used by Debian10
Browse files Browse the repository at this point in the history
  • Loading branch information
f18m committed Oct 31, 2023
1 parent d312b44 commit a0fe78c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions doc/Makefile.am
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions doc/zmq.adoc
@@ -1,4 +1,4 @@
ifeval::["{backend}" == "manpage"]
ifeval::["{zmq_output_format}" == "manpage"]

= zmq(7)

Expand All @@ -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::[]

Expand Down

0 comments on commit a0fe78c

Please sign in to comment.