Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59860 - sandbox/example/libs/example/doc
From: daniel_james_at_[hidden]
Date: 2010-02-24 04:13:36


Author: danieljames
Date: 2010-02-24 04:13:33 EST (Wed, 24 Feb 2010)
New Revision: 59860
URL: http://svn.boost.org/trac/boost/changeset/59860

Log:
Quick demonstration of how to generate docbook from doxygen.
Added:
   sandbox/example/libs/example/doc/make-docbook.sh (contents, props changed)

Added: sandbox/example/libs/example/doc/make-docbook.sh
==============================================================================
--- (empty file)
+++ sandbox/example/libs/example/doc/make-docbook.sh 2010-02-24 04:13:33 EST (Wed, 24 Feb 2010)
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Quick example to show how docbook can be manually generated from doxygen.
+#
+# Requires BOOST_ROOT to be set to the locations where boost is installed.
+# Also requires doxygen and xsltproc to be in your path.
+
+BUILD_DIR=build
+
+mkdir -p $BUILD_DIR/doxygen
+
+# 1: Use doxygen to generate its xml based documentation:
+
+cat > $BUILD_DIR/doxygen/example.doxyfile <<EOF
+ENABLE_PREPROCESSING = YES
+EXPAND_ONLY_PREDEF = YES
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+GENERATE_HTML = NO
+GENERATE_XML = YES
+GENERATE_LATEX = NO
+HIDE_UNDOC_MEMBERS = YES
+MACRO_EXPANSION = YES
+XML_OUTPUT = doxygen-xml
+OUTPUT_DIRECTORY = $BUILD_DIR/
+INPUT=../../../boost/example/example.hpp
+EOF
+
+doxygen $BUILD_DIR/doxygen/example.doxyfile
+
+DOXYGEN_OUTPUT_DIR=$BUILD_DIR/doxygen-xml
+
+# 2: Set up our xml catalog:
+
+cat > $BUILD_DIR/catalog.xml <<EOF
+<?xml version="1.0"?>
+<!DOCTYPE catalog
+ PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <rewriteURI uriStartString="http://www.boost.org/tools/boostbook/dtd/"
+ rewritePrefix="file://$BOOST_ROOT/tools/boostbook/dtd/"/>
+</catalog>
+EOF
+
+export XML_CATALOG_FILES=$(pwd)/$BUILD_DIR/catalog.xml
+
+# 2: Collect the doxygen output into a single file
+
+xsltproc --stringparam doxygen.xml.path $DOXYGEN_OUTPUT_DIR \
+ -o $BUILD_DIR/example.doxygen \
+ $BOOST_ROOT/tools/boostbook/xsl/doxygen/collect.xsl \
+ $DOXYGEN_OUTPUT_DIR/index.xml
+
+# 3: Convert the doxygen xml to boostbook
+
+xsltproc -o $BUILD_DIR/example.boostbook \
+ $BOOST_ROOT/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl \
+ $BUILD_DIR/example.doxygen
+
+# 4: Convert the boostbook to docbook
+
+xsltproc -o example.docbook \
+ $BOOST_ROOT/tools/boostbook/xsl/docbook.xsl \
+ $BUILD_DIR/example.boostbook


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk