Get release note conversion working on Windows.
authorGerald Combs <gerald@wireshark.org>
Fri, 15 Mar 2013 17:00:21 +0000 (17:00 -0000)
committerGerald Combs <gerald@wireshark.org>
Fri, 15 Mar 2013 17:00:21 +0000 (17:00 -0000)
svn path=/trunk/; revision=48321

config.nmake
docbook/Makefile.nmake
docbook/README.txt

index a2407f4929378b0edb3ccf2b13f1394e7d6dcd1a..18c5ebad4186c1f14c90212d45344cc579e78429 100644 (file)
@@ -1129,8 +1129,11 @@ XSLTPROC="xsltproc"
 # the XML validator (part of cygwin's libxml2 package)
 XMLLINT="xmllint"
 
-# Asciidoc converter (part of cygwin's asciidoc package)
-A2X="a2x"
+# Asciidoc converter (part of cygwin's asciidoc package). In order to build
+# the release notes you must have the Cygwin asciidoc and lynx packages
+# installed.
+A2X=a2x
+LYNX=lynx
 
 ##############################################################################
 #
index ea8d166abc988ac9f20f8b1e2c53793496840b44..18338bf612ec786127a7ee73130d56c4a718624e 100644 (file)
@@ -22,6 +22,10 @@ RELEASE_NOTES_SOURCE = $(RELEASE_NOTES_SOURCE) Makefile.nmake
 A2X_HTML_OPTS="--stylesheet=ws.css"
 A2X_TEXT_OPTS=
 
+!ifdef LYNX
+A2X_TEXT_OPTS=$(A2X_TEXT_OPTS) --lynx
+!endif
+
 # Automatically generate .pdf files from .fo files
 .fo.pdf:
        $(FOP) $< $@
@@ -211,14 +215,20 @@ release_notes_x: release-notes.html release-notes.txt release-notes-a4.pdf relea
 # create html single page file
 release-notes.html: $(RELEASE_NOTES_SOURCE)
        @ echo --- RELEASE NOTES - HTML ---
-       $(A2X) --format=xhtml $(A2X_HTML_OPTS) release-notes.asciidoc
+       $(SH) <<
+       PATH=/usr/bin
+       $(A2X) -v --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 ---
-       $(A2X) --format=text $(A2X_TEXT_OPTS) \
+       $(SH) <<
+       PATH=/usr/bin
+       $(A2X) -v --format=text $(A2X_TEXT_OPTS) \
                --xsltproc-opts "--stringparam generate.toc \"article nop\"" \
                release-notes.asciidoc
+<<
        mv release-notes.text $@
 
 news: release-notes.txt
@@ -227,18 +237,24 @@ news: release-notes.txt
 # 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 ---
+       $(SH) <<
+       PATH=/usr/bin
        $(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 ---
+       $(SH) <<
+       PATH=/usr/bin
        $(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 $@
 
index fc1e48b2ce14a496c4f76732ac65a67a2932a284..a6efcfb3323336fc412bc8921b2f4aca5a160cc9 100644 (file)
@@ -11,10 +11,8 @@ This directory contains the source files needed to build the:
 To build everything, just do 'make' (for Win32: 'nmake -f Makefile.nmake')
 but see the requirements below.
 
-
-The guides are written in Docbook/XML (formerly Docbook/SGML). This format is
-now used by many other documentation projects, e.g. "the Linux Documentation
-Project."
+The guides are written in Docbook/XML (formerly Docbook/SGML). The release
+notes are written in AsciiDoc (http://asciidoc.org/).
 
 To get HTML, PDF or other output formats, conversions are done using XSL
 stylesheets, which provides a flexible way for these conversions.
@@ -23,7 +21,7 @@ By default the Makefile generates HTML in single page and multiple (chunked)
 formats and two PDF's.
 
 Win32 only: The optional output format CHM has to be enabled by setting
-HHC_EXE in ..\config.nmake.
+HHC_EXE in ..\config.nmake. Microsoft has dropped support for HTML Help
 
 
 Settings:
@@ -102,17 +100,22 @@ http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-dow
 then extract the archive, then copy JimiProClasses.zip to FOP's lib dir and
 rename it to jimi-1.0.jar.
 
-Win32 only: HTML help compiler (for .chm generation only)
----------------------------------------------------------
-HTML Help Compiler (hhc.exe) from Microsoft:
-http://www.microsoft.com/en-us/download/details.aspx?id=21138
+AsciiDoc 
+--------
+Text documentation format and conversion suite: http://asciidoc.org/.
+AsciiDoc can use either w3m (default) or Lynx for plain text output.
+We use Lynx for the official release notes.
 
 Lynx
 ----
-Text based web browser used to convert release_notes.html into plain text
-format.
+Text based web browser which can to convert HTML to plain text.
 (Alternative [*nix]: elinks)
 
+Win32 only: HTML help compiler (for .chm generation only)
+---------------------------------------------------------
+HTML Help Compiler (hhc.exe) from Microsoft:
+http://www.microsoft.com/en-us/download/details.aspx?id=21138
+
 Packages for Win32
 ------------------
 See ..\config.nmake for Win32 settings. You may need to run