Switch to Asciidoc for the release notes. The initial conversion from

Docbook was done using Pandoc and cleaned up by hand. Add an
asciidoc.conf which contains macros for linking to Wireshark bugs and
CVE IDs.

Remove the release-notes.chm target. I don't think we ever used it and
we're probably better off generating PDF or HTML if we need something
fancier than plain text.

In configure.ac, consolidate program path discovery a bit and add a2x
discovery.

svn path=/trunk/; revision=48307
This commit is contained in:
Gerald Combs 2013-03-15 00:08:18 +00:00
parent 930deed11d
commit fc6e505dac
5 changed files with 93 additions and 95 deletions

View File

@ -1129,7 +1129,8 @@ XSLTPROC="xsltproc"
# the XML validator (part of cygwin's libxml2 package)
XMLLINT="xmllint"
# Asciidoc converter (part of cygwin's asciidoc package)
A2X="a2x"
##############################################################################
#

View File

@ -133,17 +133,11 @@ else
fi
fi
AC_PATH_PROG(PYTHON, python)
AC_PATH_PROG(DESKTOP_FILE_INSTALL, desktop-file-install)
AC_SUBST(PERL)
AC_SUBST(LEX)
AC_SUBST(POD2MAN)
AC_SUBST(POD2HTML)
AC_SUBST(PYTHON)
AC_SUBST(XSLTPROC)
AC_SUBST(XMLLINT)
AC_SUBST(DESKTOP_FILE_INSTALL)
#
# Set "ac_supports_gcc_flags" if the compiler is known to support GCC-style
@ -299,43 +293,50 @@ AC_ARG_WITH([gtk3],
# FIXME: currently the path argument to with-libsmi is being ignored
AX_LIBSMI
# Check for xsltproc
AC_PATH_PROG(XSLTPROC, xsltproc)
AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
#
# Program paths
#
# Check for xmllint
AC_PATH_PROG(XMLLINT, xmllint)
AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
# Check for a2x (convert asciidoc to another format)
AC_PATH_PROG(A2X, a2x)
AC_CHECK_PROG(HAVE_A2X, a2x, "yes", "no")
AM_CONDITIONAL(HAVE_A2X, test x$HAVE_A2X = xyes)
AC_PATH_PROG(DESKTOP_FILE_INSTALL, desktop-file-install)
# Want to control a tape drive? Use mt. Want to convert HTML to text?
# Uhhhhh... elinks? lynx? w3m? pandoc? html2text?
AC_PATH_PROG(ELINKS, elinks)
AC_CHECK_PROG(HAVE_ELINKS, elinks, "yes", "no")
AM_CONDITIONAL(HAVE_ELINKS, test x$HAVE_ELINKS = xyes)
# Check for fop (translate .fo to e.g. pdf)
AC_PATH_PROG(FOP, fop)
AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
#
# Look for something to convert HTML to text (for docbook/)
#
AC_PATH_PROG(ELINKS, elinks)
AC_CHECK_PROG(HAVE_ELINKS, elinks, "yes", "no")
AM_CONDITIONAL(HAVE_ELINKS, test x$HAVE_ELINKS = xyes)
## links: Fails as used in docbook/Makefile.am
## (Rather than fixing things we'll just disable the use of links).
##AC_PATH_PROG(LINKS, links)
##AC_CHECK_PROG(HAVE_LINKS, links, "yes", "no")
##AM_CONDITIONAL(HAVE_LINKS, test x$HAVE_LINKS = xyes)
# Check for lynx (html -> text)
AC_PATH_PROG(LYNX, lynx)
AC_CHECK_PROG(HAVE_LYNX, lynx, "yes", "no")
AM_CONDITIONAL(HAVE_LYNX, test x$HAVE_LYNX = xyes)
AC_PATH_PROG(PYTHON, python)
# Check for w3m (html -> text)
AC_PATH_PROG(W3M, w3m)
AC_CHECK_PROG(HAVE_W3M, w3m, "yes", "no")
AM_CONDITIONAL(HAVE_W3M, test x$HAVE_W3M = xyes)
# Check for xmllint
AC_PATH_PROG(XMLLINT, xmllint)
AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
# Check for xsltproc
AC_PATH_PROG(XSLTPROC, xsltproc)
AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
# Check for hhc (html help compiler)
AC_PATH_PROG(HHC, hhc.exe)
AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
AM_CONDITIONAL(HAVE_HHC, test x$HAVE_HHC = xyes)
# Check for packaging utilities
# For now, we check to see if the various packaging utilites are in our

View File

@ -9,10 +9,16 @@
# formatting objects processor
# Additional options to fop.
# This needs to contain at least the argument '-Xmx256m'
# fop executable is found in configure.ac.
FOP_OPTS=-Xmx256m
# fop executable is found in configure.in .
# XXX - have it check for the right version (0.20.5 or newer)?
# Asciidoc converter
A2X_HTML_OPTS="--stylesheet=ws.css"
A2X_TEXT_OPTS=
#if HAVE_LYNX
A2X_TEXT_OPTS+="--lynx"
#endif
# html to text converter for text version of release notes, e.g. elinks.
# This could also be "lynx", or "true" if neither elinks nor lynx is installed
@ -204,48 +210,46 @@ developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
if HAVE_FOP
RELEASE_NOTES_TARGETS=release_notes.validated release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
else
RELEASE_NOTES_TARGETS=release_notes.validated release-notes.html release-notes.txt
RELEASE_NOTES_TARGETS=release-notes.html release-notes.txt
endif
release_notes: $(RELEASE_NOTES_TARGETS)
# validate the content
release_notes.validated: $(RELEASE_NOTES_SOURCE)
if HAVE_XMLLINT
@ echo --- RELEASE NOTES - VALIDATING XML ---
$(XMLLINT) --valid --noout $<
touch $@
else
@ echo --- RELEASE NOTES - SKIP VALIDATION ---
endif
# create html single page file
release-notes.html: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - HTML ---
$(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< > $@
$(A2X) --format=xhtml $(A2X_HTML_OPTS) release-notes.asciidoc
# create txt single page file (through HTML)
release-notes.txt: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - TXT ---
$(XSLTPROC) --stringparam generate.toc "article nop" \
--nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $< | $(HTML2TXT) > $@
$(A2X) --format=text $(A2X_TEXT_OPTS) \
--xsltproc-opts "--stringparam generate.toc \"article nop\"" \
release-notes.asciidoc
mv release-notes.text $@
news: release-notes.txt
cp release-notes.txt ../NEWS
# create pdf file (through XSL-FO), portrait pages on US letter paper
# you will get lot's of errors, but that's ok
release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF US PAPER ---
$(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
# create pdf file, portrait pages on US letter paper
release-notes-us.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF US LETTER PAPER ---
$(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
--xsltproc-opts "--stringparam paper.type letter --nonet" \
--xsl-file=custom_layer_pdf.xsl \
release-notes.asciidoc
mv release-notes.pdf $@
# create pdf file (through XSL-FO), portrait pages on A4 paper
# you will get lot's of errors, but that's ok
release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
# create pdf file, portrait pages on A4 paper
release-notes-a4.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF A4 PAPER ---
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
$(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
--xsltproc-opts "--stringparam paper.type A4 --nonet" \
--xsl-file=custom_layer_pdf.xsl \
release-notes.asciidoc
mv release-notes.pdf $@
clean-local:
-rm -rf $(CLEANDIRS)

View File

@ -207,9 +207,9 @@ WSDG_SOURCE = \
$(WSDG_GRAPHICS)
RELEASE_NOTES_SOURCE = \
release-notes.xml \
release-notes.asciidoc \
Makefile.common \
svn_version.xml
asciidoc.conf
CLEANFILES = \
*.chm \
@ -249,4 +249,3 @@ WSLUA_MODULES = \
../epan/wslua/wslua_tree.c \
../epan/wslua/wslua_tvb.c \
../epan/wslua/wslua_util.c

View File

@ -18,6 +18,10 @@ WSUG_SOURCE = $(WSUG_SOURCE) Makefile.nmake
WSDG_SOURCE = $(WSDG_SOURCE) Makefile.nmake
RELEASE_NOTES_SOURCE = $(RELEASE_NOTES_SOURCE) Makefile.nmake
# Asciidoc converter
A2X_HTML_OPTS="--stylesheet=ws.css"
A2X_TEXT_OPTS=
# Automatically generate .pdf files from .fo files
.fo.pdf:
$(FOP) $< $@
@ -44,7 +48,7 @@ wsug: wsug.validated wsug_x
wsdg: wsdg.validated wsdg_x
# Make only the release notes
release_notes: release_notes.validated release_notes_x
release_notes: $(RELEASE_NOTES_SOURCE)
# Clean all
clean:
@ -56,7 +60,7 @@ maintainer-clean: distclean
# -- All -------------------------------------------------------------------------------
all_x: wsug.validated wsdg.validated release_notes.validated wsug_x wsdg_x release_notes_x
all_x: wsug.validated wsdg.validated wsug_x wsdg_x release_notes_x
# -- User Guide ------------------------------------------------------------------------
@ -202,50 +206,39 @@ developer-guide.chm: $(WSDG_SOURCE)
# -- Release Notes ------------------------------------------------------------------------
release_notes_x: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf release-notes.chm
# validate the content
release_notes.validated: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - VALIDATING XML ---
$(XMLLINT) --valid --noout release-notes.xml
touch $@
release_notes_x: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
# create html single page file
release-notes.html: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - HTML ---
$(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl release-notes.xml > $@
$(A2X) --format=xhtml $(A2X_HTML_OPTS) release-notes.asciidoc
# create txt single page file (through HTML)
release-notes.txt: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - TXT ---
$(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl release-notes.xml | $(HTML2TXT) > $@
$(A2X) --format=text $(A2X_TEXT_OPTS) \
--xsltproc-opts "--stringparam generate.toc \"article nop\"" \
release-notes.asciidoc
mv release-notes.text $@
news: release-notes.txt
copy release-notes.txt ..\NEWS
# create pdf file (through XSL-FO), portrait pages on US letter paper (the default)
# you will get lot's of errors, but that's ok
release-notes-us.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
!ifdef FOP
@ echo --- RELEASE NOTES - PDF US PAPER ---
$(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl release-notes.xml > $@
!endif
# create pdf file, portrait pages on US letter paper
release-notes-us.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF US LETTER PAPER ---
$(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
--xsltproc-opts "--stringparam paper.type letter --nonet" \
--xsl-file=custom_layer_pdf.xsl \
release-notes.asciidoc
mv release-notes.pdf $@
# create pdf file (through XSL-FO), portrait pages on A4 paper
# you will get lot's of errors, but that's ok
release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
!ifdef FOP
# create pdf file, portrait pages on A4 paper
release-notes-a4.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF A4 PAPER ---
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl release-notes.xml > $@
!endif
$(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
--xsltproc-opts "--stringparam paper.type A4 --nonet" \
--xsl-file=custom_layer_pdf.xsl \
release-notes.asciidoc
mv release-notes.pdf $@
# create MS html help file (through html chunked pages)
release-notes.chm: $(RELEASE_NOTES_SOURCE)
!ifdef HHC_EXE
@ echo --- RELEASE NOTES - MICROSOFT HTML HELP ---
$(XSLTPROC) --stringparam base.dir release_notes_chm/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl release-notes.xml
-$(HHC_EXE) htmlhelp.hhp
-mv htmlhelp.chm $@
-rm -r htmlhelp.hhp
-rm -r toc.hhc
!endif