forked from osmocom/wireshark
![Jeff Morriss](/assets/img/avatar_default.png)
This at least gets the docbook source distributed, as requested in: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3871 Still to do: 1) get out-of-source-tree builds working 2) automatically check that everything is distributed with distcheck (requires (1) but it may also require building the docbook directory as part of "make all") 3) (optional) use automake rules to actually build the stuff (currently Makefile.am is basically some automake stuff wrapped around standard Makefile rules. Could this done better?) svn path=/trunk/; revision=31858
242 lines
10 KiB
Makefile
242 lines
10 KiB
Makefile
#
|
|
# Make the "Wireshark User Guide" and "Wireshark Developer Guide"
|
|
# in several formats.
|
|
# See the Readme.txt file for instructions.
|
|
#
|
|
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake [target ...]
|
|
#
|
|
# $Id$
|
|
#
|
|
|
|
############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################
|
|
|
|
TOOLS_DIR=..\tools
|
|
include ..\config.nmake
|
|
include Makefile.common
|
|
|
|
WSUG_SOURCE = $(WSUG_SOURCE) Makefile.nmake Makefile.common
|
|
WSDG_SOURCE = $(WSDG_SOURCE) Makefile.nmake Makefile.common
|
|
RELEASE_NOTES_SOURCE = $(RELEASE_NOTES_SOURCE) Makefile.nmake Makefile.common
|
|
|
|
# Automatically generate .pdf files from .fo files
|
|
.fo.pdf:
|
|
$(FOP) $< $@
|
|
|
|
.SUFFIXES: .fo .pdf
|
|
|
|
# On every build, record the working copy revision string
|
|
# in svn_version.xml (if the svn version has changed).
|
|
# This is done during nmake "preprocessing" so that it's done *before*
|
|
# nmake gets the date/time of the dependency file(s)].
|
|
!IF [$(SH) ./check_svn_version.sh]
|
|
!ENDIF
|
|
|
|
|
|
# -- (Public) targets -------------------------------------------------------
|
|
|
|
# Make all (default)
|
|
all: all_x
|
|
|
|
# Make only the WSUG
|
|
wsug: wsug.validated wsug_x
|
|
|
|
# Make only the WSDG
|
|
wsdg: wsdg.validated wsdg_x
|
|
|
|
# Make only the release notes
|
|
release_notes: release_notes.validated release_notes_x
|
|
|
|
# Clean all
|
|
clean:
|
|
rm -rf $(CLEANFILES) $(CLEANDIRS)
|
|
|
|
# -- All -------------------------------------------------------------------------------
|
|
|
|
all_x: wsug.validated wsdg.validated release_notes.validated wsug_x wsdg_x release_notes_x
|
|
|
|
# -- User Guide ------------------------------------------------------------------------
|
|
|
|
wsug_x: 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) wsluarm
|
|
@ echo --- WSUG - VALIDATING XML ---
|
|
$(XMLLINT) --valid --noout user-guide.xml
|
|
touch $@
|
|
|
|
# create html single page file
|
|
user-guide.html: wsug_html/user-guide.html
|
|
|
|
wsug_html/user-guide.html: $(WSUG_SOURCE) wsluarm
|
|
@ echo --- WSUG - HTML SINGLE PAGE ---
|
|
if not exist wsug_html\wsug_graphics\toolbar md 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 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 user-guide.xml > $@
|
|
-chmod -R og+rX wsug_html
|
|
|
|
# create html chunked page files
|
|
wsug_html_chunked: wsug_html_chunked\index.html
|
|
|
|
wsug_html_chunked\index.html: $(WSUG_SOURCE) wsluarm
|
|
@ echo --- WSUG - HTML CHUNKED ---
|
|
if not exist wsug_html_chunked\wsug_graphics\toolbar md 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 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 user-guide.xml
|
|
-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) custom_layer_pdf.xsl wsluarm
|
|
!ifdef FOP
|
|
@ echo --- WSUG - PDF US PAPER ---
|
|
$(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl user-guide.xml > $@
|
|
!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) custom_layer_pdf.xsl wsluarm
|
|
!ifdef FOP
|
|
@ echo --- WSUG - PDF A4 PAPER ---
|
|
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > $@
|
|
!endif
|
|
|
|
# create MS html help file (through html chunked pages)
|
|
user-guide.chm: $(WSUG_SOURCE) wsluarm
|
|
!ifdef HHC_EXE
|
|
@ echo --- WSUG - MICROSOFT HTML HELP ---
|
|
if not exist wsug_chm\wsug_graphics\toolbar md 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 user-guide.xml
|
|
-$(HHC_EXE) htmlhelp.hhp
|
|
-mv htmlhelp.chm $@
|
|
-rm -r htmlhelp.hhp
|
|
-rm -r toc.hhc
|
|
|
|
user-guide.zip: user-guide.chm
|
|
rm -f user-guide.zip
|
|
zip user-guide.zip user-guide.chm
|
|
!else
|
|
user-guide.zip:
|
|
!endif
|
|
|
|
wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
|
|
$(PERL) make-wsluarm.pl $(WSLUA_MODULES)
|
|
touch wsluarm
|
|
|
|
# -- Developer's Guide ------------------------------------------------------------------------
|
|
|
|
wsdg_x: wsdg_html_chunked developer-guide.html developer-guide-a4.pdf developer-guide-us.pdf developer-guide.chm
|
|
|
|
# validate the content
|
|
wsdg.validated: $(WSDG_SOURCE)
|
|
@ echo --- WSDG - VALIDATING XML ---
|
|
$(XMLLINT) --valid --noout developer-guide.xml
|
|
touch $@
|
|
|
|
# create html single page file
|
|
developer-guide.html: wsdg_html/developer-guide.html
|
|
|
|
wsdg_html/developer-guide.html: $(WSDG_SOURCE)
|
|
@ echo --- WSDG - HTML SINGLE PAGE ---
|
|
if not exist wsdg_html\wsdg_graphics md 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 developer-guide.xml > $@
|
|
-chmod -R og+rX wsdg_html
|
|
|
|
# create html chunked page files
|
|
wsdg_html_chunked: wsdg_html_chunked/index.html
|
|
|
|
wsdg_html_chunked/index.html: $(WSDG_SOURCE)
|
|
@ echo --- WSDG - HTML CHUNKED ---
|
|
if not exist wsdg_html_chunked\wsdg_graphics md wsdg_html_chunked\wsdg_graphics
|
|
cp wsdg_graphics/* wsdg_html_chunked/wsdg_graphics
|
|
cp 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 developer-guide.xml
|
|
-chmod -R og+rX wsdg_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
|
|
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 developer-guide.xml > $@
|
|
!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) custom_layer_pdf.xsl
|
|
!ifdef FOP
|
|
@ echo --- WSDG - PDF A4 PAPER ---
|
|
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > $@
|
|
!endif
|
|
|
|
# create MS html help file (through html chunked pages)
|
|
developer-guide.chm: $(WSDG_SOURCE)
|
|
!ifdef HHC_EXE
|
|
@ echo --- WSDG - MICROSOFT HTML HELP ---
|
|
if not exist wsdg_chm\wsdg_graphics md wsdg_chm\wsdg_graphics
|
|
cp wsdg_graphics/* wsdg_chm/wsdg_graphics
|
|
$(XSLTPROC) --stringparam base.dir wsdg_chm/ --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/htmlhelp/htmlhelp.xsl developer-guide.xml
|
|
-$(HHC_EXE) htmlhelp.hhp
|
|
-mv htmlhelp.chm $@
|
|
-rm -r htmlhelp.hhp
|
|
-rm -r toc.hhc
|
|
!endif
|
|
|
|
# -- 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 $@
|
|
|
|
# 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 > $@
|
|
|
|
# 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) > $@
|
|
|
|
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
|
|
@ echo --- RELEASE NOTES - PDF A4 PAPER ---
|
|
$(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl release-notes.xml > $@
|
|
!endif
|
|
|
|
# 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
|
|
|