From 6b650bc433700a63a3e91586a6ac0d6260f727c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Sun, 20 Feb 2005 05:01:46 +0000 Subject: Beginnings of autogenerating docbook/Makefile (long way to go) so call it Makefile.auto for now svn path=/trunk/; revision=13439 --- configure.in | 23 +++++++ docbook/Makefile.auto.am | 164 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 187 insertions(+) create mode 100644 docbook/Makefile.auto.am diff --git a/configure.in b/configure.in index 150cb130fb..f3c07ed009 100644 --- a/configure.in +++ b/configure.in @@ -47,12 +47,34 @@ AC_SUBST(POD2HTML) AC_SUBST(LEX) AC_SUBST(FLEX_PATH) AC_SUBST(PYTHON) +AC_SUBST(XSLTPROC) +AC_SUBST(XMLLINT) # Check for doxygen AC_PATH_PROG(DOXYGEN, doxygen) AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no") AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = 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 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 fop ( +AC_PATH_PROG(FOP, fop.sh) +AC_CHECK_PROG(HAVE_FOP, fop.sh, "yes", "no") +AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = 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 # path. I'm too lazy to write code to go hunt for them. - Gerald @@ -1211,6 +1233,7 @@ AC_OUTPUT( Makefile doxygen.cfg doc/Makefile + docbook/Makefile.auto epan/Makefile epan/doxygen.cfg epan/dfilter/Makefile diff --git a/docbook/Makefile.auto.am b/docbook/Makefile.auto.am new file mode 100644 index 0000000000..6470107a5f --- /dev/null +++ b/docbook/Makefile.auto.am @@ -0,0 +1,164 @@ +# +# Make the "Ethereal User Guide" and "Ethereal Developer Guide" +# in several formats. +# See the Readme.txt file for instructions. +# +# $Id$ +# + +# if you need to change this, don't forget to change it in catalog.xml too + +# On suse 9.2, uncomment the following line: +DOCBOOKXSL="/usr/share/xml/docbook/stylesheet/nwalsh/1.65.1" + +#DOCBOOKXSL="/usr/share/docbook-xsl" + +############### YOU SHOULDN'T HAVE TO EDIT ANYTHING BELOW THIS LINE! ################ + +# as eug_chm will stop with an error, make sure it's the last in this dependency list +all: eug edg + +eug: eug_validate eug_pdf_a4 eug_html eug_html_chunked eug_chm + +clean: + rm -f *.html + rm -f htmlhelp.* + rm -f *.hhc + rm -f *.hhp + rm -f *.fo + rm -f *.pdf + rm -f *.chm + rm -rf eug_html + rm -rf eug_html_chunked + rm -rf eug_chm + rm -rf edg_html + rm -rf edg_html_chunked + rm -rf edg_chm + + +images: + cp $(DOCBOOKXSL)/images/note.png ./graphics + cp $(DOCBOOKXSL)/images/tip.png ./graphics + cp $(DOCBOOKXSL)/images/warning.png ./graphics + +# validate the content +eug_validate: + @ echo --- VALIDATING XML --- + $(XMLLINT) --valid --noout user-guide.xml + +# create html single page file +eug_html: + @ echo --- HTML SINGLE PAGE --- + mkdir -p eug_html + mkdir -p eug_html/graphics + mkdir -p eug_html/graphics/toolbar + cp ./graphics/*.* eug_html/graphics + cp ./graphics/toolbar/*.* eug_html/graphics/toolbar + $(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl user-guide.xml > eug_html/user-guide.html + +# create html chunked page files +eug_html_chunked: images + @ echo --- HTML CHUNKED --- + mkdir -p eug_html_chunked + mkdir -p eug_html_chunked/graphics + mkdir -p eug_html_chunked/graphics/toolbar + cp ./graphics/*.* eug_html_chunked/graphics + cp ./graphics/toolbar/*.* eug_html_chunked/graphics/toolbar + $(XSLTPROC) --stringparam base.dir eug_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 --nonet $(DOCBOOKXSL)/html/chunk.xsl user-guide.xml + +# 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 +eug_pdf_us: images +if HAVE_FOP + @ echo --- PDF US PAPER --- + $(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl user-guide.xml > user-guide.fo + $(FOP) user-guide.fo user-guide.pdf +endif + +# create pdf file (through XSL-FO), portrait pages on A4 paper +# you will get lot's of errors, but that's ok +eug_pdf_a4: images +if HAVE_FOP + @ echo --- PDF A4 PAPER --- + $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl user-guide.xml > user-guide.fo + $(FOP) user-guide.fo user-guide.pdf +endif + +# create MS html help file (through html chunked pages) +eug_chm: images +if HAVE_HHC + @ echo --- MICROSOFT HTML HELP --- + mkdir -p eug_chm + mkdir -p eug_chm/graphics + mkdir -p eug_chm/graphics/toolbar + cp ./graphics/*.* eug_chm/graphics + cp ./graphics/toolbar/*.* eug_chm/graphics/toolbar + $(XSLTPROC) --stringparam base.dir eug_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 $(DOCBOOKXSL)/htmlhelp/htmlhelp.xsl user-guide.xml + -$(HHC) htmlhelp.hhp + mv htmlhelp.chm user-guide.chm + rm -r htmlhelp.hhp + rm -r toc.hhc +endif + + +edg: edg_validate edg_html_chunked edg_pdf_a4 edg_html edg_chm + +# validate the content +edg_validate: + @ echo --- VALIDATING XML --- + $(XMLLINT) --valid --noout developer-guide.xml + +# create html single page file +edg_html: + @ echo --- HTML SINGLE PAGE --- + mkdir -p edg_html + mkdir -p edg_html/graphics + mkdir -p edg_html/graphics/toolbar + cp ./graphics/*.* edg_html/graphics + cp ./graphics/toolbar/*.* edg_html/graphics/toolbar + $(XSLTPROC) --nonet $(DOCBOOKXSL)/html/docbook.xsl developer-guide.xml > edg_html/developer-guide.html + +# create html chunked page files +edg_html_chunked: images + @ echo --- HTML CHUNKED --- + mkdir -p edg_html_chunked + mkdir -p edg_html_chunked/graphics + mkdir -p edg_html_chunked/graphics/toolbar + cp ./graphics/*.* edg_html_chunked/graphics + cp ./graphics/toolbar/*.* edg_html_chunked/graphics/toolbar + $(XSLTPROC) --stringparam base.dir edg_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 --nonet $(DOCBOOKXSL)/html/chunk.xsl developer-guide.xml + +# 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 +edg_pdf_us: images +if HAVE_FOP + @ echo --- PDF US PAPER --- + $(XSLTPROC) --nonet custom_layer_pdf.xsl $(DOCBOOKXSL)/fo/docbook.xsl developer-guide.xml > developer-guide.fo + $(FOP) developer-guide.fo developer-guide.pdf +endif + +# create pdf file (through XSL-FO), portrait pages on A4 paper +# you will get lot's of errors, but that's ok +edg_pdf_a4: images +if HAVE_FOP + @ echo --- PDF A4 PAPER --- + $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl developer-guide.xml > developer-guide.fo + $(FOP) developer-guide.fo developer-guide.pdf +endif + +# create MS html help file (through html chunked pages) +edg_chm: images +if HAVE_HHC + @ echo --- MICROSOFT HTML HELP --- + mkdir -p edg_chm + mkdir -p edg_chm/graphics + mkdir -p edg_chm/graphics/toolbar + cp ./graphics/*.* edg_chm/graphics + cp ./graphics/toolbar/*.* edg_chm/graphics/toolbar + $(XSLTPROC) --stringparam base.dir edg_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 $(DOCBOOKXSL)/htmlhelp/htmlhelp.xsl developer-guide.xml + -$(HHC) htmlhelp.hhp + mv htmlhelp.chm developer-guide.chm + rm -r htmlhelp.hhp + rm -r toc.hhc +endif + -- cgit v1.2.3