From Graham Bloice:
[obnox/wireshark/wip.git] / docbook / Makefile
index a727905d98d22511b53a33a902945e4a7e3576e3..42e18387fe0c41cd1de79cdd378a181fcbf65de6 100644 (file)
@@ -9,7 +9,7 @@
 # formatting objects processor
 # Additional options to fop.
 # This needs to contain at least the argument '-Xmx256m'
-FOP_OPTS=-Xmx256m
+FOP_OPTS?=-Xmx256m
 
 # fop executable
 # Leave these commented out if you don't have fop instlled or you
@@ -17,196 +17,207 @@ FOP_OPTS=-Xmx256m
 #
 # for win32 (cygwin) environments (as of fop-0.20 the cygwin script does
 # not use $FOP_OPTS)
-#FOP=fop-0.20.5/fop.bat
+FOP?=fop-0.20.5/fop.bat
 #
 # for unix like environments (if you have problems with fop, try to use an absolute path here)
 #FOP=fop-0.20.5/fop.sh
 #
-# One SUSE 9.1 and 9.2 uncomment the following line (make sure you have at least fop-0.20.5-71.2)
+# One SUSE 9.1 and newer uncomment the following line (make sure you have
+# at least fop-0.20.5-71.2)
 #FOP=fop
 
 # html help compiler (Win32 only)
 # Leave these commented out if you don't have HHC installed or you
 # don't want CHM documentation.
-#HHC="/cygdrive/c/Program Files/HTML Help Workshop/hhc.exe"
+HHC?="/cygdrive/c/Program Files/HTML Help Workshop/hhc.exe"
 #HHC="true"
 
-# elinks (text version of release notes)
+# 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
-#ELINKS=elinks
-ELINKS="true"
+# (cygwin: lynx works, elinks not available, links and true doesn't produce output)
+#HTML2TXT=elinks -dump -dump-width 72
+#HTML2TXT=links -dump -width 72
+HTML2TXT?=lynx -dump -width=72 -nolist -stdin
+#HTML2TXT="true"
 
 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
 
 # the XSL processor
-XSLTPROC="xsltproc"
+XSLTPROC?="xsltproc"
 
 # the XML validator (from the xsltproc package)
-XMLLINT="xmllint"
+XMLLINT?="xmllint"
 
 # Automatically generate .pdf files from .fo files
+# Suse needs FOP_OPTS, Debian needs JAVA_OPTS
 .fo.pdf:
-       FOP_OPTS="$(FOP_OPTS)" $(FOP) $< $@
-# On Debian use this line
-#      JAVA_OPTS="$(FOP_OPTS)" $(FOP) $< $@
+       FOP_OPTS="$(FOP_OPTS) $(JAVA_OPTS)" $(FOP) $< $@
 
 WSUG_FILES =   \
-       wsug_src/WSUG_app_files.xml \
-       wsug_src/WSUG_app_howitworks.xml \
-       wsug_src/WSUG_app_messages.xml \
-       wsug_src/WSUG_app_protocols.xml \
-       wsug_src/WSUG_app_tools.xml \
-       wsug_src/WSUG_chapter_advanced.xml \
-       wsug_src/WSUG_chapter_build_install.xml \
-       wsug_src/WSUG_chapter_capture.xml \
-       wsug_src/WSUG_chapter_customize.xml \
-       wsug_src/WSUG_chapter_introduction.xml \
-       wsug_src/WSUG_chapter_io.xml \
-       wsug_src/WSUG_chapter_statistics.xml \
-       wsug_src/WSUG_chapter_troubleshoot.xml \
-       wsug_src/WSUG_chapter_use.xml \
-       wsug_src/WSUG_chapter_work.xml \
-       wsug_src/WSUG_meta_info.xml \
-       wsug_src/WSUG_preface.xml
+       wsug_src/WSUG_app_files.xml             \
+       wsug_src/WSUG_app_howitworks.xml        \
+       wsug_src/WSUG_app_messages.xml          \
+       wsug_src/WSUG_app_protocols.xml         \
+       wsug_src/WSUG_app_tools.xml             \
+       wsug_src/WSUG_chapter_advanced.xml      \
+       wsug_src/WSUG_chapter_build_install.xml \
+       wsug_src/WSUG_chapter_capture.xml       \
+       wsug_src/WSUG_chapter_customize.xml     \
+       wsug_src/WSUG_chapter_introduction.xml  \
+       wsug_src/WSUG_chapter_io.xml            \
+       wsug_src/WSUG_chapter_statistics.xml    \
+       wsug_src/WSUG_chapter_troubleshoot.xml  \
+       wsug_src/WSUG_chapter_use.xml           \
+       wsug_src/WSUG_chapter_work.xml          \
+       wsug_src/WSUG_meta_info.xml             \
+       wsug_src/WSUG_preface.xml               \
+       ws.css
 
 WSUG_GRAPHICS =        \
-       graphics/ethereal-3pane.png                     \
-       graphics/ethereal-analyze-menu.png              \
-       graphics/ethereal-bytes-pane-popup-menu.png     \
-       graphics/ethereal-bytes-pane-tabs.png           \
-       graphics/ethereal-bytes-pane.png                \
-       graphics/ethereal-capture-info.png              \
-       graphics/ethereal-capture-interfaces.png        \
-       graphics/ethereal-capture-menu.png              \
-       graphics/ethereal-capture-options.png           \
-       graphics/ethereal-capture-preferences.png       \
-       graphics/ethereal-choose-color-rule.png         \
-       graphics/ethereal-coloring-rules-dialog.png     \
-       graphics/ethereal-decode-as-show.png            \
-       graphics/ethereal-decode-as.png                 \
-       graphics/ethereal-details-pane-popup-menu.png   \
-       graphics/ethereal-details-pane.png              \
-       graphics/ethereal-display-filter-tcp.png        \
-       graphics/ethereal-edit-color-rule-dialog.png    \
-       graphics/ethereal-edit-menu.png                 \
-       graphics/ethereal-empty.png                     \
-       graphics/ethereal-enabled-protocols.png         \
-       graphics/ethereal-error-file-exists.png         \
-       graphics/ethereal-error-open.png                \
-       graphics/ethereal-export-pdml.png               \
-       graphics/ethereal-export-plain.png              \
-       graphics/ethereal-export-ps.png                 \
-       graphics/ethereal-export-psml.png               \
-       graphics/ethereal-export-selected.png           \
-       graphics/ethereal-file-menu.png                 \
-       graphics/ethereal-file-set-dialog.png           \
-       graphics/ethereal-filter-add-expression.png     \
-       graphics/ethereal-filter-toolbar.png            \
-       graphics/ethereal-filters-2.png                 \
-       graphics/ethereal-filters.png                   \
-       graphics/ethereal-find-packet.png               \
-       graphics/ethereal-follow-stream.png             \
-       graphics/ethereal-go-menu.png                   \
-       graphics/ethereal-goto-packet.png               \
-       graphics/ethereal-gui-colors-preferences.png    \
-       graphics/ethereal-gui-columns-preferences.png   \
-       graphics/ethereal-gui-font-preferences.png      \
-       graphics/ethereal-gui-layout-preferences.png    \
-       graphics/ethereal-gui-preferences.png           \
-       graphics/ethereal-help-menu.png                 \
-       graphics/ethereal-list-pane.png                 \
-       graphics/ethereal-main-toolbar.png              \
-       graphics/ethereal-menu.png                      \
-       graphics/ethereal-merge.png                     \
-       graphics/ethereal-nameresolution-preferences.png        \
-       graphics/ethereal-open.png                      \
-       graphics/ethereal-packet-format.png             \
-       graphics/ethereal-packet-pane-popup-menu.png    \
-       graphics/ethereal-packet-range.png              \
-       graphics/ethereal-packet-selected.png           \
-       graphics/ethereal-packet-sep-win.png            \
-       graphics/ethereal-print.png                     \
-       graphics/ethereal-printing-preferences.png      \
-       graphics/ethereal-save-as.png                   \
-       graphics/ethereal-statistics-menu.png           \
-       graphics/ethereal-stats-conversations.png       \
-       graphics/ethereal-stats-endpoints.png           \
-       graphics/ethereal-stats-hierarchy.png           \
-       graphics/ethereal-stats-iographs.png            \
-       graphics/ethereal-stats-srt-dcerpc-filter.png   \
-       graphics/ethereal-stats-srt-dcerpc.png          \
-       graphics/ethereal-stats-summary.png             \
-       graphics/ethereal-statusbar-empty.png           \
-       graphics/ethereal-statusbar-loaded.png          \
-       graphics/ethereal-statusbar-selected.png        \
-       graphics/ethereal-time-reference.png            \
-       graphics/ethereal-view-menu.png                 \
-       graphics/note.png                               \
-       graphics/tip.png                                \
-       graphics/warning.png                            \
-       graphics/toolbar/autoscroll_24.png              \
-       graphics/toolbar/capture_filter_24.png          \
-       graphics/toolbar/capture_interfaces_24.png      \
-       graphics/toolbar/capture_options_24.png         \
-       graphics/toolbar/capture_restart_24.png         \
-       graphics/toolbar/capture_start_24.png           \
-       graphics/toolbar/capture_stop_24.png            \
-       graphics/toolbar/colorize_24.png                \
-       graphics/toolbar/display_filter_24.png          \
-       graphics/toolbar/resize_columns_24.png          \
-       graphics/toolbar/stock_add_24.png               \
-       graphics/toolbar/stock_bottom_24.png            \
-       graphics/toolbar/stock_close_24.png             \
-       graphics/toolbar/stock_colorselector_24.png     \
-       graphics/toolbar/stock_help_24.png              \
-       graphics/toolbar/stock_jump_to_24.png           \
-       graphics/toolbar/stock_left_arrow_24.png        \
-       graphics/toolbar/stock_open_24.png              \
-       graphics/toolbar/stock_preferences_24.png       \
-       graphics/toolbar/stock_print_24.png             \
-       graphics/toolbar/stock_properties_24.png        \
-       graphics/toolbar/stock_refresh_24.png           \
-       graphics/toolbar/stock_right_arrow_24.png       \
-       graphics/toolbar/stock_save_24.png              \
-       graphics/toolbar/stock_save_as_24.png           \
-       graphics/toolbar/stock_search_24.png            \
-       graphics/toolbar/stock_stop_24.png              \
-       graphics/toolbar/stock_top_24.png               \
-       graphics/toolbar/stock_zoom_1_24.png            \
-       graphics/toolbar/stock_zoom_in_24.png           \
-       graphics/toolbar/stock_zoom_out_24.png          \
-       graphics/wireshark-logo.png                     \
-       graphics/wireshark-main.png
+       wsug_graphics/ws-analyze-menu.png               \
+       wsug_graphics/ws-bytes-pane-popup-menu.png      \
+       wsug_graphics/ws-bytes-pane-tabs.png            \
+       wsug_graphics/ws-bytes-pane.png                 \
+       wsug_graphics/ws-capture-info.png               \
+       wsug_graphics/ws-capture-interfaces.png         \
+       wsug_graphics/ws-capture-menu.png               \
+       wsug_graphics/ws-capture-options.png            \
+       wsug_graphics/ws-capture-preferences.png        \
+       wsug_graphics/ws-choose-color-rule.png          \
+       wsug_graphics/ws-coloring-fields.png            \
+       wsug_graphics/ws-coloring-rules-dialog.png      \
+       wsug_graphics/ws-decode-as-show.png             \
+       wsug_graphics/ws-decode-as.png                  \
+       wsug_graphics/ws-details-pane-popup-menu.png    \
+       wsug_graphics/ws-details-pane.png               \
+       wsug_graphics/ws-display-filter-tcp.png         \
+       wsug_graphics/ws-edit-color-rule-dialog.png     \
+       wsug_graphics/ws-edit-menu.png                  \
+       wsug_graphics/ws-enabled-protocols.png          \
+       wsug_graphics/ws-export-pdml.png                \
+       wsug_graphics/ws-export-plain.png               \
+       wsug_graphics/ws-export-ps.png                  \
+       wsug_graphics/ws-export-psml.png                \
+       wsug_graphics/ws-export-selected.png            \
+       wsug_graphics/ws-file-menu.png                  \
+       wsug_graphics/ws-file-set-dialog.png            \
+       wsug_graphics/ws-filter-add-expression.png      \
+       wsug_graphics/ws-filter-toolbar.png             \
+       wsug_graphics/ws-filters.png                    \
+       wsug_graphics/ws-find-packet.png                \
+       wsug_graphics/ws-follow-stream.png              \
+       wsug_graphics/ws-go-menu.png                    \
+       wsug_graphics/ws-goto-packet.png                \
+       wsug_graphics/ws-gui-colors-preferences.png     \
+       wsug_graphics/ws-gui-columns-preferences.png    \
+       wsug_graphics/ws-gui-font-preferences.png       \
+       wsug_graphics/ws-gui-layout-preferences.png     \
+       wsug_graphics/ws-gui-preferences.png            \
+       wsug_graphics/ws-help-menu.png                  \
+       wsug_graphics/ws-list-pane.png                  \
+       wsug_graphics/ws-main-toolbar.png               \
+       wsug_graphics/ws-menu.png                       \
+       wsug_graphics/ws-merge-gtk1.png                 \
+       wsug_graphics/ws-merge-gtk2.png                 \
+       wsug_graphics/ws-merge-win32.png                \
+       wsug_graphics/ws-nameresolution-preferences.png \
+       wsug_graphics/ws-open-gtk1.png                  \
+       wsug_graphics/ws-open-gtk2.png                  \
+       wsug_graphics/ws-open-win32.png                 \
+       wsug_graphics/ws-packet-format.png              \
+       wsug_graphics/ws-packet-pane-popup-menu.png     \
+       wsug_graphics/ws-packet-range.png               \
+       wsug_graphics/ws-packet-selected.png            \
+       wsug_graphics/ws-packet-sep-win.png             \
+       wsug_graphics/ws-print.png                      \
+       wsug_graphics/ws-printing-preferences.png       \
+       wsug_graphics/ws-save-as-gtk1.png               \
+       wsug_graphics/ws-save-as-gtk2.png               \
+       wsug_graphics/ws-save-as-win32.png              \
+       wsug_graphics/ws-statistics-menu.png            \
+       wsug_graphics/ws-stats-conversations.png        \
+       wsug_graphics/ws-stats-endpoints.png            \
+       wsug_graphics/ws-stats-hierarchy.png            \
+       wsug_graphics/ws-stats-iographs.png             \
+       wsug_graphics/ws-stats-srt-dcerpc-filter.png    \
+       wsug_graphics/ws-stats-srt-dcerpc.png           \
+       wsug_graphics/ws-stats-summary.png              \
+       wsug_graphics/ws-statusbar-empty.png            \
+       wsug_graphics/ws-statusbar-loaded.png           \
+       wsug_graphics/ws-statusbar-selected.png         \
+       wsug_graphics/ws-time-reference.png             \
+       wsug_graphics/ws-view-menu.png                  \
+       wsug_graphics/note.png                          \
+       wsug_graphics/tip.png                           \
+       wsug_graphics/warning.png                               \
+       wsug_graphics/toolbar/autoscroll_24.png                 \
+       wsug_graphics/toolbar/capture_filter_24.png             \
+       wsug_graphics/toolbar/capture_interfaces_24.png         \
+       wsug_graphics/toolbar/capture_options_24.png            \
+       wsug_graphics/toolbar/capture_restart_24.png            \
+       wsug_graphics/toolbar/capture_start_24.png              \
+       wsug_graphics/toolbar/capture_stop_24.png               \
+       wsug_graphics/toolbar/colorize_24.png                   \
+       wsug_graphics/toolbar/display_filter_24.png             \
+       wsug_graphics/toolbar/resize_columns_24.png             \
+       wsug_graphics/toolbar/stock_add_24.png                  \
+       wsug_graphics/toolbar/stock_apply_20.png                \
+       wsug_graphics/toolbar/stock_bottom_24.png               \
+       wsug_graphics/toolbar/stock_clear_24.png                \
+       wsug_graphics/toolbar/stock_close_24.png                \
+       wsug_graphics/toolbar/stock_colorselector_24.png        \
+       wsug_graphics/toolbar/stock_help_24.png                 \
+       wsug_graphics/toolbar/stock_jump_to_24.png              \
+       wsug_graphics/toolbar/stock_left_arrow_24.png           \
+       wsug_graphics/toolbar/stock_open_24.png                 \
+       wsug_graphics/toolbar/stock_preferences_24.png          \
+       wsug_graphics/toolbar/stock_print_24.png                \
+       wsug_graphics/toolbar/stock_properties_24.png           \
+       wsug_graphics/toolbar/stock_refresh_24.png              \
+       wsug_graphics/toolbar/stock_right_arrow_24.png          \
+       wsug_graphics/toolbar/stock_save_24.png                 \
+       wsug_graphics/toolbar/stock_save_as_24.png              \
+       wsug_graphics/toolbar/stock_search_24.png               \
+       wsug_graphics/toolbar/stock_stop_24.png                 \
+       wsug_graphics/toolbar/stock_top_24.png                  \
+       wsug_graphics/toolbar/stock_zoom_1_24.png               \
+       wsug_graphics/toolbar/stock_zoom_in_24.png              \
+       wsug_graphics/toolbar/stock_zoom_out_24.png             \
+       wsug_graphics/ws-logo.png                       \
+       wsug_graphics/ws-main.png
 
 WSDG_FILES =   \
-       wsdg_src/EDG_chapter_build_intro.xml    \
-       wsdg_src/EDG_chapter_capture.xml        \
-       wsdg_src/EDG_chapter_dissection.xml     \
-       wsdg_src/EDG_chapter_env_intro.xml      \
-       wsdg_src/EDG_chapter_libraries.xml      \
-       wsdg_src/EDG_chapter_sources.xml        \
-       wsdg_src/EDG_chapter_tools.xml          \
-       wsdg_src/EDG_chapter_userinterface.xml  \
-       wsdg_src/EDG_chapter_works.xml          \
-       wsdg_src/EDG_meta_info.xml              \
-       wsdg_src/EDG_preface.xml
+       wsdg_src/WSDG_chapter_build_intro.xml   \
+       wsdg_src/WSDG_chapter_capture.xml       \
+       wsdg_src/WSDG_chapter_dissection.xml    \
+       wsdg_src/WSDG_chapter_env_intro.xml     \
+       wsdg_src/WSDG_chapter_libraries.xml     \
+       wsdg_src/WSDG_chapter_quick_setup.xml   \
+       wsdg_src/WSDG_chapter_sources.xml       \
+       wsdg_src/WSDG_chapter_tools.xml         \
+       wsdg_src/WSDG_chapter_userinterface.xml \
+       wsdg_src/WSDG_chapter_works.xml         \
+       wsdg_src/WSDG_meta_info.xml             \
+       wsdg_src/WSDG_preface.xml               \
+       ws.css
 
 WSDG_GRAPHICS =        \
-       wsdg_graphics/ethereal-capture-sync.dia         \
-       wsdg_graphics/ethereal-capture-sync.png         \
-       wsdg_graphics/ethereal-capture_internals.dia    \
-       wsdg_graphics/ethereal-capture_internals.png    \
-       wsdg_graphics/ethereal-function-blocks.dia      \
-       wsdg_graphics/ethereal-function-blocks.png      \
-       wsdg_graphics/wireshark-logo.png                \
-       wsdg_graphics/note.png                          \
-       wsdg_graphics/tip.png                           \
+       wsdg_graphics/ws-capture-sync.dia       \
+       wsdg_graphics/ws-capture-sync.png       \
+       wsdg_graphics/ws-capture_internals.dia  \
+       wsdg_graphics/ws-capture_internals.png  \
+       wsdg_graphics/ws-function-blocks.dia    \
+       wsdg_graphics/ws-function-blocks.png    \
+       wsdg_graphics/ws-logo.png               \
+       wsdg_graphics/note.png                  \
+       wsdg_graphics/tip.png                   \
        wsdg_graphics/warning.png
 
 # user-guide.xml must be first in the list (to match $<)
 WSUG_SOURCE =  \
        user-guide.xml          \
        svn_version.xml         \
+       Makefile                \
        $(WSUG_FILES)           \
        $(WSUG_GRAPHICS)
 
@@ -214,12 +225,14 @@ WSUG_SOURCE =     \
 WSDG_SOURCE =  \
        developer-guide.xml     \
        svn_version.xml         \
+       Makefile                \
        $(WSDG_FILES)           \
        $(WSDG_GRAPHICS)
 
 RELEASE_NOTES_SOURCE = \
        release-notes.xml       \
-       svn_version.xml
+       svn_version.xml         \
+       Makefile
 
 CLEANFILES =   \
        *.chm                   \
@@ -230,18 +243,23 @@ CLEANFILES =      \
        *.validated             \
        wsdg_chm                \
        wsdg_html               \
+       wsdg_html.zip           \
        wsdg_html_chunked       \
+       wsdg_html_chunked.zip   \
        wsug_chm                \
        wsug_html               \
+       wsug_html.zip           \
        wsug_html_chunked       \
+       wsug_html_chunked.zip   \
        htmlhelp.*              \
        release_notes_chm       \
        release-notes.html      \
        release-notes.txt       \
        svn_version.xml         \
+       user-guide.zip          \
 
 
-all: wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
+all: svn_version_check wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
 
 clean:
        rm -rf $(CLEANFILES)
@@ -254,13 +272,14 @@ clean:
 # FORCE is the portable version of .PHONY
 FORCE:
 
-svn_version.xml: FORCE
-       echo -n '<!ENTITY SvnVersion "' > svn_version.xml
-       svnversion -n .                   >> svn_version.xml
-       echo '">'   >> svn_version.xml
+svn_version_check: FORCE
+       dos2unix ./check_svn_version.sh
+       @ ./check_svn_version.sh
+
+svn_version.xml: svn_version_check
 
 
-wsug: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm
+wsug: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm user-guide.zip
 
 # validate the content
 wsug.validated: $(WSUG_SOURCE)
@@ -269,28 +288,32 @@ wsug.validated: $(WSUG_SOURCE)
        touch $@
 
 # create html single page file
-user-guide.html: $(WSUG_SOURCE)
+user-guide.html: wsug_html/user-guide.html
+
+wsug_html/user-guide.html: $(WSUG_SOURCE)
        @ echo --- WSUG - HTML SINGLE PAGE ---
-       mkdir -p wsug_html/graphics/toolbar
-       cp graphics/*.* wsug_html/graphics
-       cp graphics/toolbar/* wsug_html/graphics/toolbar
+       mkdir -p wsug_html/wsug_graphics/toolbar
+       cp wsug_graphics/*.* wsug_html/wsug_graphics
+       cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
        cp ws.css wsug_html
-       $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam  use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > wsug_html/$@
+       $(XSLTPROC) --stringparam base.dir wsug_html/ --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 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
        -chmod -R og+rX wsug_html
-       
+
 # create html chunked page files
-wsug_html_chunked: $(WSUG_SOURCE)
+wsug_html_chunked: wsug_html_chunked/index.html
+
+wsug_html_chunked/index.html: $(WSUG_SOURCE)
        @ echo --- WSUG - HTML CHUNKED ---
-       mkdir -p wsug_html_chunked/graphics/toolbar
-       cp graphics/*.* wsug_html_chunked/graphics
-       cp graphics/toolbar/* wsug_html_chunked/graphics/toolbar
+       mkdir -p wsug_html_chunked/wsug_graphics/toolbar
+       cp wsug_graphics/*.* wsug_html_chunked/wsug_graphics
+       cp wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
        cp ws.css wsug_html_chunked
-       $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ --stringparam  use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
+       $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ --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 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
        -chmod -R og+rX wsug_html_chunked
 
 # 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
-user-guide-us.fo: $(WSUG_SOURCE)
+user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
 ifdef FOP
        @ echo --- WSUG - PDF US PAPER ---
        $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
@@ -298,7 +321,7 @@ endif
 
 # create pdf file (through XSL-FO), portrait pages on A4 paper
 # you will get lot's of errors, but that's ok
-user-guide-a4.fo: $(WSUG_SOURCE)
+user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl
 ifdef FOP
        @ echo --- WSUG - PDF A4 PAPER ---
        $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
@@ -308,16 +331,22 @@ endif
 user-guide.chm: $(WSUG_SOURCE)
 ifdef HHC
        @ echo --- WSUG - MICROSOFT HTML HELP ---
-       mkdir -p wsug_chm/graphics/toolbar
-       -cp graphics/*.* wsug_chm/graphics/
-       -cp graphics/toolbar/* wsug_chm/graphics/toolbar/
-       $(XSLTPROC) --stringparam base.dir wsug_chm/ --stringparam  use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path graphics/ --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1  --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl $<
+       mkdir -p wsug_chm/wsug_graphics/toolbar
+       -cp wsug_graphics/*.* wsug_chm/wsug_graphics/
+       -cp wsug_graphics/toolbar/* wsug_chm/wsug_graphics/toolbar/
+       $(XSLTPROC) --stringparam base.dir wsug_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  --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl $<
        -$(HHC) htmlhelp.hhp
        -mv htmlhelp.chm $@
        -rm -r htmlhelp.hhp
        -rm -r toc.hhc
 endif
 
+user-guide.zip: user-guide.chm
+ifdef HHC
+       rm -f user-guide.zip
+       zip user-guide.zip user-guide.chm
+endif
+
 
 wsdg: wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf developer-guide.chm
 
@@ -328,16 +357,20 @@ wsdg.validated: $(WSDG_SOURCE)
        touch $@
 
 # create html single page file
-developer-guide.html: $(WSDG_SOURCE)
+developer-guide.html: wsdg_html/developer-guide.html
+
+wsdg_html/developer-guide.html: $(WSDG_SOURCE)
        @ echo --- WSDG - HTML SINGLE PAGE ---
        mkdir -p wsdg_html/wsdg_graphics
        cp wsdg_graphics/* wsdg_html/wsdg_graphics
        cp ws.css wsdg_html
-       $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam  use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > wsdg_html/$@
+       $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam  use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
        -chmod -R og+rX wsdg_html
-       
+
 # create html chunked page files
-wsdg_html_chunked: $(WSDG_SOURCE)
+wsdg_html_chunked: wsdg_html_chunked/index.html
+
+wsdg_html_chunked/index.html: $(WSDG_SOURCE)
        @ echo --- WSDG - HTML CHUNKED ---
        mkdir -p wsdg_html_chunked
        mkdir -p wsdg_html_chunked/wsdg_graphics
@@ -348,7 +381,7 @@ wsdg_html_chunked: $(WSDG_SOURCE)
 
 # 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
-developer-guide-us.fo: $(WSDG_SOURCE)
+developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
 ifdef FOP
        @ echo --- WSDG - PDF US PAPER ---
        $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
@@ -356,7 +389,7 @@ endif
 
 # create pdf file (through XSL-FO), portrait pages on A4 paper
 # you will get lot's of errors, but that's ok
-developer-guide-a4.fo: $(WSDG_SOURCE)
+developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
 ifdef FOP
        @ echo --- WSDG - PDF A4 PAPER ---
        $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
@@ -389,14 +422,14 @@ release-notes.html: $(RELEASE_NOTES_SOURCE)
        @ echo --- RELEASE NOTES - HTML ---
        $(XSLTPROC) --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
 
-# create txt single page file
+# 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/html/docbook.xsl $< | $(ELINKS) -dump -dump-width 72 > $@
+       $(XSLTPROC) --stringparam generate.toc "article nop" --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< | $(HTML2TXT) > $@
        
 # 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)
+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 $< > $@
@@ -404,7 +437,7 @@ 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)
+release-notes-a4.fo: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
 ifdef FOP
        @ echo --- RELEASE NOTES - PDF A4 PAPER ---
        $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
@@ -414,7 +447,7 @@ endif
 release-notes.chm: $(RELEASE_NOTES_SOURCE)
 ifdef HHC
        @ 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 graphics/ --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1 --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl $<
+       $(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 $<
        -$(HHC) htmlhelp.hhp
        -mv htmlhelp.chm $@
        -rm -r htmlhelp.hhp