diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-03-15 00:08:18 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-03-15 00:08:18 +0000 |
commit | fc6e505dacdc12792b5f2175f007715bfe3ce471 (patch) | |
tree | fe95d218ce8c1bb7d3a50f8901c15a42643452ec | |
parent | 930deed11d544da5bd4e3e5ad4e7d26ff06354af (diff) |
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
-rw-r--r-- | config.nmake | 3 | ||||
-rw-r--r-- | configure.ac | 61 | ||||
-rw-r--r-- | docbook/Makefile.am | 58 | ||||
-rw-r--r-- | docbook/Makefile.common | 5 | ||||
-rw-r--r-- | docbook/Makefile.nmake | 63 |
5 files changed, 94 insertions, 96 deletions
diff --git a/config.nmake b/config.nmake index 03ac461179..a2407f4929 100644 --- a/config.nmake +++ b/config.nmake @@ -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" ############################################################################## # diff --git a/configure.ac b/configure.ac index e86e666b8f..ac94e91624 100644 --- a/configure.ac +++ b/configure.ac @@ -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) -# 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) +AC_PATH_PROG(DESKTOP_FILE_INSTALL, desktop-file-install) -# -# Look for something to convert HTML to text (for docbook/) -# +# 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) -## 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 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) +# 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 diff --git a/docbook/Makefile.am b/docbook/Makefile.am index 643b0aa48b..d0afb1a8de 100644 --- a/docbook/Makefile.am +++ b/docbook/Makefile.am @@ -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 (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 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, 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) diff --git a/docbook/Makefile.common b/docbook/Makefile.common index 0f74303512..587feb6a88 100644 --- a/docbook/Makefile.common +++ b/docbook/Makefile.common @@ -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 - diff --git a/docbook/Makefile.nmake b/docbook/Makefile.nmake index 6ad30831f6..ea8d166abc 100644 --- a/docbook/Makefile.nmake +++ b/docbook/Makefile.nmake @@ -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 (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 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, 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 |