Skip to content

Commit

Permalink
Merge aa78d96 into f0c471a
Browse files Browse the repository at this point in the history
  • Loading branch information
f18m committed Oct 31, 2023
2 parents f0c471a + aa78d96 commit 7104d94
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ syntax: glob # for hg-git users
builds/Makefile
builds/deprecated-msvc/Makefile
doc/Makefile
doc/__pagelist
libtool
### automake
Makefile.in
Expand Down
37 changes: 24 additions & 13 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ MAN7 = \
zmq_null.7 zmq_plain.7 zmq_curve.7 zmq_tipc.7 zmq_vmci.7 zmq_udp.7 \
zmq_gssapi.7

# MAN_ADOC contains all original Asciidoc files from git repo
MAN_ADOC = $(MAN3:%.3=%.adoc) $(MAN7:%.7=%.adoc)
# ASCIIDOC_DOC contains all the Asciidoc files checked into the git repo
ASCIIDOC_DOC = index.adoc $(MAN3:%.3=%.adoc) $(MAN7:%.7=%.adoc)

# MAN_DOC contains all the MANUAL PAGES (generated from asciidoc files)
# MAN_DOC contains all the MANPAGE documentation (generated from asciidoc files)
MAN_DOC = $(MAN3) $(MAN7)

# MAN_HTML contains all the HTML PAGES (generated from asciidoc files)
MAN_HTML = $(MAN_ADOC:%.adoc=%.html)
# HTML_DOC contains all the HTML documentation (generated from asciidoc files)
HTML_DOC = $(ASCIIDOC_DOC:%.adoc=%.html)

MAINTAINERCLEANFILES =
EXTRA_DIST = $(MAN_ADOC)
EXTRA_DIST = $(ASCIIDOC_DOC)


#
Expand All @@ -47,26 +47,37 @@ EXTRA_DIST = $(MAN_ADOC)
#
if BUILD_DOC

EXTRA_DIST += $(MAN_HTML) $(MAN_DOC)
MAINTAINERCLEANFILES += $(MAN_HTML) $(MAN_DOC)
EXTRA_DIST += $(HTML_DOC) $(MAN_DOC)
MAINTAINERCLEANFILES += $(HTML_DOC) $(MAN_DOC)
SUFFIXES=.html .adoc .3 .7

.adoc.html:
.adoc.html:
asciidoctor -b html -azmq_version=@PACKAGE_VERSION@ $<
.adoc.3:
asciidoctor -b manpage -azmq_version=@PACKAGE_VERSION@ $<
.adoc.7:
asciidoctor -b manpage -azmq_version=@PACKAGE_VERSION@ $<

dist-hook : $(MAN_DOC) $(MAN_HTML)
dist-hook : $(MAN_DOC) $(HTML_DOC)

# the following Bash snippet is used to automatically generate an alphabetical list included by index.adoc:
__pagelist:
echo >__pagelist
for adocfile in $$(ls *.adoc); do \
if [ "$${adocfile}" != "index.adoc" ]; then \
noext=$${adocfile//.adoc/}; \
echo "* xref:$${adocfile}[$${noext}]" >> __pagelist; \
fi ; \
done

index.html : __pagelist

# To help publishing HTML files into github Pages, we indicate github that the "zmq.html" page is the index page;
# that page contains a link to all other documentation pages
all-local : $(MAN_DOC) $(MAN_HTML)
ln -sf zmq.html index.html
all-local : __pagelist $(MAN_DOC) $(HTML_DOC)

clean-local :
rm -f $(MAN3) $(MAN7) $(MAN_HTML)
rm -f $(MAN_DOC) $(HTML_DOC)

endif

Expand Down
9 changes: 9 additions & 0 deletions doc/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= ZMQ API reference

This documentation is for libzmq {zmq_version}.

A suggested start to understand 0MQ (also written as ZMQ or ZeroMQ) is the xref:zmq.adoc[zmq] manpage.

== Alphabetic list of documentation pages

include::__pagelist[]

0 comments on commit 7104d94

Please sign in to comment.