diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-10-19 15:03:55 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-02-11 18:22:09 +0000 |
commit | 94a0f7c6414cb83535e89557ce3cce47a1808fec (patch) | |
tree | c6e6f18ed0e324bed987ac2873571ffa9e6e7d74 /configure.ac | |
parent | 5a674d05c900be0007b71d11ff52e7f972359b5d (diff) |
Switch from AsciiDoc to Asciidoctor.
Switch the markup text processor for files in the docbook directory from
AsciiDoc to Asciidoctor. Asciidoctor has several useful features (such
as direct PDF output) and is actively developed. It's written in Ruby
but that dependency can be sidestepped with AsciidoctorJ, a
self-contained bundle that only depends on the JRE.
The current toolchain targets require Python, AsciiDoc, DocBook XML,
DocBook XSL, Java, FOP, xsltproc, lynx, and the HTMLHelp compiler:
HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
PDF: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → FOP
HTMLHelp: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → HHC
This change removes the AsciiDoc and FOP requirements and adds either
AsciidoctorJ or Asciidoctor + Ruby:
HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
PDF: Asciidoctor
HTMLHelp: Asciidoctor → DocBook XML → xsltproc + DocBook XSL → HHC
Ideally we could generate all of these using AsciidoctorJ, Java, and
lynx. Unfortunately we're not there yet.
The release notes depend on several macros (ws-buglink, ws-salink,
cve-idlink, sort-and-group). Add Asciidoctor (Ruby) equivalents.
Remove the BUILD_xxx_GUIDES CMake options and add various output targets
automatically. This means that you have to build the various documentation
targets explicitly.
Change-Id: I31930677a656b99b1c6839bb6c33a13db951eb9a
Reviewed-on: https://code.wireshark.org/review/25668
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 129f3cb99e..dc19170564 100644 --- a/configure.ac +++ b/configure.ac @@ -444,40 +444,36 @@ AC_ARG_ENABLE(guides, # Check for programs used when building DocBook documentation. # have_wsug=yes -AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc) -AS_IF([test ! -x "$XSLTPROC"], +AC_PATH_PROGS(ASCIIDOCTOR, [asciidoctorj asciidoctor]) +AC_CHECK_PROGS(HAVE_ASCIIDOCTOR, [asciidoctorj asciidoctor], "yes", "no") +AM_CONDITIONAL(HAVE_ASCIIDOCTOR, test x$HAVE_ASCIIDOCTOR = xyes) +AS_IF([test ! -x "$ASCIIDOCTOR"], [ AS_IF([test "x$want_wsug" = xyes], - [AC_MSG_ERROR([xlstproc not found but required to build the Wireshark User's Guide])]) + [AC_MSG_ERROR([Asciidoctor not found. This is required to build the release notes and guides])]) have_wsug=no ]) -AC_PATH_PROG(A2X, a2x, a2x) -AS_IF([test ! -x "$A2X"], +AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc) +AS_IF([test ! -x "$XSLTPROC"], [ AS_IF([test "x$want_wsug" = xyes], - [AC_MSG_ERROR([a2x not found but required to build the Wireshark User's Guide])]) + [AC_MSG_ERROR([xlstproc not found but required to build the Wireshark User's Guide])]) have_wsug=no ]) -AC_PATH_PROG(FOP, fop, fop) - AM_CONDITIONAL(BUILD_USER_GUIDE, [test "x$have_wsug" = xyes -a "x$want_wsug" != xno]) -# HTML to text processor +# HTML to text processor. Executable must support "-dump". AC_MSG_CHECKING([for an HTML to text processor]) -AS_IF([w3m -version >&AS_MESSAGE_LOG_FD 2>&1], [have_a2x_text=w3m], - [lynx -version >&AS_MESSAGE_LOG_FD 2>&1], [have_a2x_text=lynx], - [have_a2x_text=no]) -AC_MSG_RESULT([$have_a2x_text]) -AM_CONDITIONAL(HAVE_A2X_TEXT, [test "x$have_a2x_text" != xno]) -AS_IF([test $have_a2x_text = lynx], [A2X_LYNX="--lynx"]) -AC_SUBST(A2X_LYNX) +AC_PATH_PROGS(LYNX, [lynx w3m links]) +AC_CHECK_PROGS(HAVE_LYNX, [lynx w3m links], "yes", "no") +AM_CONDITIONAL(HAVE_LYNX, test x$HAVE_LYNX = xyes) # RPM AC_CHECK_PROGS(RPMBUILD, [rpmbuild], [rpmbuild]) # Shellcheck -AC_CHECK_PROGS(SHELLCHECK, shellcheck, shellcheck) +AC_CHECK_PROG(SHELLCHECK, shellcheck) # # Check compiler vendor. For GCC this will be 'gnu' and for Clang 'clang'. |