xip: add support for XIP packets
[metze/wireshark/wip.git] / docbook / Makefile.am
index 1d364a0442aaeac4dd473a283f30e4eb9637e5fc..8f8ae167ac373aaccc5aa1a56f30c72e9a989929 100644 (file)
@@ -18,26 +18,6 @@ A2X_TEXT_OPTS=
 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
-# (See Bug # 1446 for note re 'force-html' below)
-# Sorry about the indenting, but that's what automake requires...
-if HAVE_ELINKS
-HTML2TXT=$(ELINKS) -dump -dump-width 72
-## links: -dump requires 'url' argument (as opposed to elinks & lynx)
-## (Rather than fixing things we'll just disable the use of links).
-##else
-##if HAVE_LINKS
-##HTML2TXT=$(LINKS) -dump -width 72
-else
-if HAVE_LYNX
-HTML2TXT=$(LYNX) -dump -width=72 -nolist -stdin -force-html
-else
-HTML2TXT="true"
-endif
-##endif
-endif
-
 ############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
 
 include Makefile.common
@@ -53,39 +33,12 @@ else
        @false
 endif
 
-# Convert an AsciiDoc document to a DocBook chapter
-# Used for chapter-by-chapter conversion from DocBook to AsciiDoc.
-# Can be removed after the User's Guide is converted.
-# .asciidoc -> whole book (.dbk) -> chapter (.xml)
-wsug_src/%.xml : wsug_src/%.asciidoc
-       $(A2X) --verbose \
-               --asciidoc-opts="--conf-file=$(srcdir)/asciidoc.conf" \
-               --no-xmllint \
-               --format=docbook --doctype=book \
-               $<
-       mv wsug_src/$*.xml wsug_src/$*.dbk
-       xmllint --xpath '//chapter | //preface' wsug_src/$*.dbk > $@
-
 if HAVE_XSLTPROC
-ALL_TARGETS=git_version_check wsug wsdg release_notes
-else
-# if we don't have XSLTPROC, there's nothing to do...
-ALL_TARGETS=git_version_check
+ALL_TARGETS=wsug wsdg release_notes
 endif
 
 all: $(ALL_TARGETS)
 
-#
-# on every build, record the working copy revision string
-#
-# FORCE is the portable version of .PHONY
-FORCE:
-
-git_version_check: FORCE
-       cat $(srcdir)/check_git_version.sh | tr -d '\015' | /bin/bash
-
-git_version.xml: git_version_check
-
 # Wireshark User Guide
 if HAVE_FOP
 WSUG_TARGETS=wsug.validated wsug_html_chunked wsug_html user-guide-a4.pdf user-guide-us.pdf
@@ -95,11 +48,19 @@ endif
 
 wsug: $(WSUG_TARGETS)
 
+user-guide.xml: user-guide.asciidoc $(WSUG_FILES)
+       $(A2X) --verbose \
+               --attribute=docinfo \
+               --asciidoc-opts="--conf-file=$(srcdir)/asciidoc.conf --conf-file=$(srcdir)/asciidoctor-asciidoc.conf" \
+               --no-xmllint \
+               --format=docbook \
+               $<
+
 # validate the content
-wsug.validated: $(WSUG_SOURCE) wsluarm
+wsug.validated: $(WSUG_SOURCE)
 if HAVE_XMLLINT
        @ echo --- WSUG - VALIDATING XML ---
-       $(XMLLINT) --path .:wsluarm_src:$(srcdir) --valid --noout $<
+       $(XMLLINT) --path .:$(srcdir) --valid --noout $<
        touch $@
 else
        @ echo --- WSUG - SKIP VALIDATION ---
@@ -112,14 +73,11 @@ wsug_html/index.html: $(WSUG_SOURCE) wsluarm
        @ echo --- WSUG - HTML SINGLE PAGE ---
        mkdir -p wsug_html/wsug_graphics/toolbar
        cp $(srcdir)/wsug_graphics/*.* wsug_html/wsug_graphics
+       cp $(srcdir)/common_graphics/*.* wsug_html/wsug_graphics
        cp $(srcdir)/wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
        cp $(srcdir)/ws.css 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 \
-                   --path .:wsluarm_src \
-                   --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
+       $(XSLTPROC) --stringparam base.dir wsug_html/ $(COMMON_XSLTPROC_ARGS) \
+               $(WSUG_XSLTPROC_ARGS) $(SINGLE_XSLTPROC_ARGS) $< > $@
        -chmod -R og+rX wsug_html
 
 # create html chunked page files
@@ -129,14 +87,11 @@ wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
        @ echo --- WSUG - HTML CHUNKED ---
        mkdir -p wsug_html_chunked/wsug_graphics/toolbar
        cp $(srcdir)/wsug_graphics/*.* wsug_html_chunked/wsug_graphics
+       cp $(srcdir)/common_graphics/*.* wsug_html_chunked/wsug_graphics
        cp $(srcdir)/wsug_graphics/toolbar/* wsug_html_chunked/wsug_graphics/toolbar
        cp $(srcdir)/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 wsug_graphics/ \
-                   --stringparam section.autolabel 1 --stringparam  section.label.includes.component.label 1 \
-                   --stringparam html.stylesheet ws.css \
-                   --path .:wsluarm_src \
-                   --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
+       $(XSLTPROC) --stringparam base.dir wsug_html_chunked/ $(COMMON_XSLTPROC_ARGS) \
+                   $(WSUG_XSLTPROC_ARGS) $(CHUNKED_XSLTPROC_ARGS) $<
        -chmod -R og+rX wsug_html_chunked
 
 # create pdf file (through XSL-FO), portrait pages on US letter paper
@@ -144,16 +99,14 @@ wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
 user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
        @ echo --- WSUG - PDF US PAPER ---
        $(XSLTPROC) --stringparam paper.type letter \
-                   --path .:wsluarm_src:$(srcdir) \
-                   --nonet custom_layer_pdf.xsl $< > $@
+               --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
 user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
        @ echo --- WSUG - PDF A4 PAPER ---
        $(XSLTPROC) --stringparam paper.type A4 \
-                   --path .:wsluarm_src:$(srcdir) \
-                   --nonet custom_layer_pdf.xsl $< > $@
+               --nonet custom_layer_pdf.xsl $< > $@
 
 wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
        mkdir -p wsluarm_src
@@ -177,7 +130,7 @@ wsdg: $(WSDG_TARGETS)
 developer-guide.xml: developer-guide.asciidoc $(WSDG_FILES)
        $(A2X) --verbose \
                --attribute=docinfo \
-               --asciidoc-opts="--conf-file=$(srcdir)/asciidoc.conf" \
+               --asciidoc-opts="--conf-file=$(srcdir)/asciidoc.conf --conf-file=$(srcdir)/asciidoctor-asciidoc.conf" \
                --no-xmllint \
                --format=docbook \
                $<
@@ -186,26 +139,25 @@ developer-guide.xml: developer-guide.asciidoc $(WSDG_FILES)
 wsdg.validated: $(WSDG_SOURCE)
 if HAVE_XMLLINT
        @ echo --- WSDG - VALIDATING XML ---
-       $(XMLLINT) --path .:$(srcdir) --valid --noout $<
+       $(XMLLINT) --path .:wsluarm_src:$(srcdir) --valid --noout $<
        touch $@
 else
        @ echo --- WSDG - SKIP VALIDATION ---
 endif
 
 # create html single page file
-wsdg_html: wsdg_html/index.html
+wsdg_html: wsdg_html/index.html wsluarm
 
 wsdg_html/index.html: $(WSDG_SOURCE)
        @ echo --- WSDG - HTML SINGLE PAGE ---
        mkdir -p wsdg_html/wsdg_graphics/toolbar
        cp $(srcdir)/wsdg_graphics/*.* wsdg_html/wsdg_graphics
+       cp $(srcdir)/common_graphics/*.* wsdg_html/wsdg_graphics
        cp $(srcdir)/wsdg_graphics/toolbar/* wsdg_html/wsdg_graphics/toolbar/
        cp $(srcdir)/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 $< > $@
+       $(XSLTPROC) --stringparam base.dir wsdg_html/ $(COMMON_XSLTPROC_ARGS) \
+               --path .:wsluarm_src \
+               $(WSDG_XSLTPROC_ARGS) $(SINGLE_XSLTPROC_ARGS) $< > $@
        -chmod -R og+rX wsdg_html
 
 # create html chunked page files
@@ -215,13 +167,12 @@ wsdg_html_chunked/index.html: $(WSDG_SOURCE)
        @ echo --- WSDG - HTML CHUNKED ---
        mkdir -p wsdg_html_chunked/wsdg_graphics/toolbar
        cp $(srcdir)/wsdg_graphics/*.* wsdg_html_chunked/wsdg_graphics
+       cp $(srcdir)/common_graphics/*.* wsdg_html_chunked/wsdg_graphics
        cp $(srcdir)/wsdg_graphics/toolbar/* wsdg_html_chunked/wsdg_graphics/toolbar/
        cp $(srcdir)/ws.css wsdg_html_chunked
-       $(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ --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/chunk.xsl $<
+       $(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ $(COMMON_XSLTPROC_ARGS) \
+               --path .:wsluarm_src \
+               $(WSDG_XSLTPROC_ARGS) $(CHUNKED_XSLTPROC_ARGS) $<
        -chmod -R og+rX wsdg_html_chunked
 
 # create pdf file (through XSL-FO), portrait pages on US letter paper
@@ -229,7 +180,7 @@ wsdg_html_chunked/index.html: $(WSDG_SOURCE)
 developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
        @ echo --- WSDG - PDF US PAPER ---
        $(XSLTPROC) --stringparam paper.type letter \
-                   --path .:$(srcdir) \
+                   --path .:wsluarm_src:$(srcdir) \
                    --nonet custom_layer_pdf.xsl $< > $@
 
 # create pdf file (through XSL-FO), portrait pages on A4 paper
@@ -237,7 +188,7 @@ developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
 developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
        @ echo --- WSDG - PDF A4 PAPER ---
        $(XSLTPROC) --stringparam paper.type A4 \
-                   --path .:$(srcdir) \
+                   --path .:wsluarm_src:$(srcdir) \
                    --nonet custom_layer_pdf.xsl $< > $@
 
 
@@ -257,14 +208,14 @@ release-notes.html: $(RELEASE_NOTES_SOURCE)
 # create txt single page file (through HTML)
 release-notes.txt: $(RELEASE_NOTES_SOURCE)
        @ echo --- RELEASE NOTES - TXT ---
-       $(A2X) --format=text $(A2X_TEXT_OPTS) \
+       TZ=UTC $(A2X) --format=text $(A2X_TEXT_OPTS) \
                --xsltproc-opts "--stringparam generate.toc \"article nop\"" \
                $(srcdir)/release-notes.asciidoc
        mv $(srcdir)/release-notes.text $@
 
 news: release-notes.txt
        cp release-notes.txt ../NEWS
-       -cp release-notes.txt $(top_srcdir)NEWS
+       -cp release-notes.txt $(top_srcdir)/NEWS
 
 # Apparently we can only run one instance of a2x at a time.
 .NOTPARALLEL: release-notes-us.pdf release-notes-a4.pdf
@@ -293,7 +244,6 @@ EXTRA_DIST = \
        $(WSUG_DIST)            \
        $(WSDG_DIST)            \
        $(RELEASE_NOTES_SOURCE) \
-       check_git_version.sh    \
        dfilter2xml.pl          \
        make-wsluarm.pl         \
        README.txt              \