[brlcad-commits] SF.net SVN: brlcad:[32747] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2008-09-24 11:13:33
|
Revision: 32747 http://brlcad.svn.sourceforge.net/brlcad/?rev=32747&view=rev Author: starseeker Date: 2008-09-24 11:13:26 +0000 (Wed, 24 Sep 2008) Log Message: ----------- Add support for building pdf versions of Docbook files via Apache FOP Modified Paths: -------------- brlcad/trunk/configure.ac brlcad/trunk/doc/docbook/system/man1/Makefile.am Modified: brlcad/trunk/configure.ac =================================================================== --- brlcad/trunk/configure.ac 2008-09-24 05:01:45 UTC (rev 32746) +++ brlcad/trunk/configure.ac 2008-09-24 11:13:26 UTC (rev 32747) @@ -263,6 +263,9 @@ # enable building Docbook documentation BC_ARG_ENABLE([build_docbook_docs], [documentation], [Enable building of Docbook documentation], [yes]) +# enable building Docbook pdf output +BC_ARG_ENABLE([build_docbook_pdf], [pdfdocumentation], [Enable Docbook pdf output], [yes]) + # enable 64-bit builds BC_ARG_ENABLE([build_64bit], [64bit-build], [Enable 64-bit compilation mode], [auto]) @@ -406,6 +409,10 @@ BC_ARG_ALIAS([build_docbook_docs], [docs]) BC_ARG_ALIAS([build_docbook_docs], [docbook]) +# Docbook documentation (help uses documentation) +BC_ARG_ALIAS([build_docbook_pdf], [pdf]) +BC_ARG_ALIAS([build_docbook_pdf], [docbook-pdf]) + # 64-bit compilation (help uses 64bit-build) BC_ARG_ALIAS([build_64bit], [64bit]) BC_ARG_ALIAS([build_64bit], [64]) @@ -732,6 +739,9 @@ AC_MSG_CHECKING(whether to build docbook documentation) AC_MSG_RESULT($bc_build_docbook_docs) +AC_MSG_CHECKING(whether to enable docbook pdf) +AC_MSG_RESULT($bc_build_docbook_pdf) + AC_MSG_CHECKING(whether to compile in 64-bit mode) AC_MSG_RESULT($bc_build_64bit) @@ -893,8 +903,18 @@ if test "$bc_build_docbook_docs" == "yes" ; then AC_PATH_PROG(XSLTPROC, xsltproc, bc_build_docbook_docs=no, [$PATH:/usr/bin]) AC_SUBST(XSLTPROC) +else + bc_build_docbook_pdf=no fi +# Apache fop is needed for docbook pdf + +if test "$bc_build_docbook_pdf" == "yes" ; then + AC_PATH_PROG(APACHEFOP, fop, bc_build_docbook_pdf=no, [$PATH:/usr/bin]) + AC_SUBST(APACHEFOP) +fi + + # AN_MAKEVAR([AR], [BC_PROG_AR]) # AN_PROGRAM([ar], [BC_PROG_AR]) # AC_DEFUN([BC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) @@ -3481,7 +3501,8 @@ AM_CONDITIONAL(WITH_PROE, [test "x$build_against_proe" != "xno"]) AM_CONDITIONAL(WITH_PARSERS, [test "x$build_parsers" != "xno"]) -AM_CONDITIONAL(BUILD_DOCBOOK, [test "x$bc_build_docbook_docs" = "xyes"]) +AM_CONDITIONAL(BUILD_DOCBOOK, [test "x$bc_build_docbook_docs" != "xno"]) +AM_CONDITIONAL(BUILD_DOCBOOK_PDF, [test "x$bc_build_docbook_pdf" != "xno"]) AM_CONDITIONAL(INSTALL_MODELS, [test "x$bc_install_geometry" = "xyes"]) AM_CONDITIONAL(ONLY_BENCHMARK, [test "x$bc_only_benchmark" != "xno"]) AM_CONDITIONAL(ONLY_RTS, [test "x$bc_only_rts" != "xno"]) @@ -4020,6 +4041,7 @@ AC_MSG_RESULT([Only build benchmark suite ...........: $bc_only_benchmark]) AC_MSG_RESULT([Only build librtserver ...............: $bc_only_rts]) AC_MSG_RESULT([Build Docbook documentation ..........: $bc_build_docbook_docs]) +AC_MSG_RESULT([Enable Docbook pdf output ............: $bc_build_docbook_pdf]) AC_MSG_RESULT([Install example geometry models ......: $bc_install_geometry]) AC_MSG_RESULT([]) if test "x$time_elapsed" != "xunknown" ; then Modified: brlcad/trunk/doc/docbook/system/man1/Makefile.am =================================================================== --- brlcad/trunk/doc/docbook/system/man1/Makefile.am 2008-09-24 05:01:45 UTC (rev 32746) +++ brlcad/trunk/doc/docbook/system/man1/Makefile.am 2008-09-24 11:13:26 UTC (rev 32747) @@ -1,10 +1,10 @@ XSLTPROC_FLAGS=-nonet -xinclude XSL_XHTML_STYLESHEET=$(top_srcdir)/doc/docbook/resources/standard/xsl/xhtml-1_1/docbook.xsl XSL_MAN_STYLESHEET=$(top_srcdir)/doc/docbook/resources/standard/xsl/manpages/docbook.xsl +XSL_FO_STYLESHEET=$(top_srcdir)/doc/docbook/resources/standard/xsl/fo/docbook.xsl XML_CATALOG_FILES=$(top_srcdir)/doc/docbook/catalog.xml - .xml.html: XML_CATALOG_FILES=$(XML_CATALOG_FILES) $(XSLTPROC) $(XSLTPROC_FLAGS) -o $@ $(XSL_XHTML_STYLESHEET) $? @@ -13,34 +13,70 @@ XML_CATALOG_FILES=$(XML_CATALOG_FILES) $(XSLTPROC) $(XSLTPROC_FLAGS) $(XSL_MAN_STYLESHEET) $? +.fo.pdf: .xml.fo + $(APACHEFOP) $*.fo -pdf $*.pdf + +.xml.fo: + XML_CATALOG_FILES=$(XML_CATALOG_FILES) $(XSLTPROC) $(XSLTPROC_FLAGS) -o $@ $(XSL_FO_STYLESHEET) $? + + man1DOCBOOK = \ alias-pix.xml \ all_sf.xml \ search.xml -if BUILD_DOCBOOK + +man1DOCBOOKhtml = \ + $(man1DOCBOOK) + +man1DOCBOOKpdf = \ + $(man1DOCBOOK) + + +man1DOCBOOKhtmldir = $(BRLCAD_DATA)/html/man1 + +BUILTHTML = \ + ${man1DOCBOOKhtml:xml=html} + +man1DOCBOOKhtml_DATA = \ + $(BUILTHTML) + +if BUILD_DOCBOOK_PDF + +man1DOCBOOKpdfdir = $(BRLCAD_DATA)/pdf/man1 + +BUILTPDF = \ + ${man1DOCBOOKpdf:xml=pdf} + +man1DOCBOOKpdf_DATA = \ + $(BUILTPDF) + + +BUILT_SOURCES = \ + $(BUILTHTML) \ + $(BUILTPDF) + +else !BUILD_DOCBOOK_PDF + +BUILT_SOURCES = \ + $(BUILTHTML) + +endif + BUILTMAN_SOURCES = \ - ${man1DOCBOOK:xml=1} - -BUILT_SOURCES = \ - ${man1DOCBOOK:xml=html} - -man1DOCBOOKdir = $(BRLCAD_DATA)/html/man1 - -man1DOCBOOK_DATA = \ - $(BUILT_SOURCES) - + ${man1DOCBOOK:xml=1} + man_MANS = \ $(BUILTMAN_SOURCES) + + + - MOSTLYCLEANFILES = \ $(BUILT_SOURCES) \ $(BUILTMAN_SOURCES) -endif - EXTRA_DIST = \ ${man1DOCBOOK} - include $(top_srcdir)/misc/Makefile.defs +include $(top_srcdir)/misc/Makefile.defs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |