Doug Gregor wrote:
BoostBook is a real pain to setup. To try to make it easier, at least for the Unixy folks around here, I've attached a little script that does most of the work. Once you have xsltproc/doxygen installed, just run this script from the directory where you want the BoostBook support files to go (anywhere is okay); it'll download the necessary XSL & DTD bits and configure bjam for you.
Doug
Hi Doug,
Neat. Thanks. It works for me on latest Cygwin with a patch. That and the resulting output follow.
The patch makes the file check and value comparison code more portable. It:
1. Changes '[ ... ]' to 'test ...'. 2. Changes '[[ ... ]]' to 'test ... && test ...'. 2. Substitutes '=' for '=='.
--- 8< ---
--- ../setup_boostbook.sh 2004-07-05 23:06:07.820713600 -0500 +++ ./setup_boostbook.sh 2004-07-05 23:05:57.385708800 -0500 @@ -11,7 +11,7 @@ HTTP_GET_CMD="curl -O" # Get the DocBook XSLT Stylesheets DOCBOOK_XSL_TARBALL=docbook-xsl-$DOCBOOK_XSL_VERSION.tar.gz
DOCBOOK_XSL_URL=$SOURCEFORGE_MIRROR/sourceforge/docbook/$DOCBOOK_XSL_TARBALL
-if [ -f $DOCBOOK_XSL_TARBALL ]; then
+if test -f $DOCBOOK_XSL_TARBALL; then
echo "Using existing DocBook XSLT Stylesheets (version $DOCBOOK_XSL_VERSION).
"
else
echo "Downloading DocBook XSLT Stylesheets version $DOCBOOK_XSL_VERSION..."
@@ -19,7 +19,7 @@ else
fi
DOCBOOK_XSL_DIR="$PWD/docbook-xsl-$DOCBOOK_XSL_VERSION"
-if [ ! -d docbook-xsl-$DOCBOOK_XSL_VERSION ]; then
+if test ! -d docbook-xsl-$DOCBOOK_XSL_VERSION; then
echo -n "Expanding DocBook XSLT Stylesheets into $DOCBOOK_XSL_DIR..."
gunzip -cd $DOCBOOK_XSL_TARBALL | tar xf -
echo "done."
@@ -45,16 +45,16 @@ fi
# Find xsltproc and doxygen
IFS=:
for dir in $PATH; do
- if [[ -f $dir/xsltproc && -x $dir/xsltproc ]]; then
+ if test -f $dir/xsltproc && test -x $dir/xsltproc; then
XSLTPROC="$dir/xsltproc"
fi
- if [[ -f $dir/doxygen && -x $dir/doxygen ]]; then
+ if test -f $dir/doxygen && test -x $dir/doxygen; then
DOXYGEN="$dir/doxygen"
fi
done# Make sure we have xsltproc
-if [ ! -f "$XSLTPROC" -a ! -x "$XSLTPROC" ]; then
+if test ! -f "$XSLTPROC" -a ! -x "$XSLTPROC"; then
echo "ERROR: Unable to find xsltproc executable."
echo "If you have already installed xsltproc, please set the environment"
echo "variable XSLTPROC to the xsltproc executable. If you do not have"
@@ -63,7 +63,7 @@ if [ ! -f "$XSLTPROC" -a ! -x "$XSLTPROC
fi
# Just notify the user if we haven't found doxygen.
-if [ ! -f "$DOXYGEN" -a ! -x "$DOXYGEN" ]; then
+if test ! -f "$DOXYGEN" -a ! -x "$DOXYGEN"; then
echo "Warning: unable to find Doxygen executable. You will not be able to"
echo " use Doxygen to generate BoostBook documentation. If you have Doxygen,
"
echo " please set the DOXYGEN environment variable to the path of the doxyge
n"
@@ -75,13 +75,13 @@ fi
# Find the input jamfile to configure JAM_CONFIG_OUT="$HOME/user-config.jam" -if [ -r "$HOME/user-config.jam" ]; then +if test -r "$HOME/user-config.jam"; then JAM_CONFIG_IN="user-config-backup.jam" cp $JAM_CONFIG_OUT user-config-backup.jam JAM_CONFIG_IN_TEMP="yes" echo -n "Updating Boost.Jam configuration in $JAM_CONFIG_OUT..."
-elif [ -r "$BOOST_ROOT/tools/build/v2/user-config.jam" ]; then +elif test -r "$BOOST_ROOT/tools/build/v2/user-config.jam"; then JAM_CONFIG_IN="$BOOST_ROOT/tools/build/v2/user-config.jam"; JAM_CONFIG_IN_TEMP="no" echo -n "Writing Boost.Jam configuration to $JAM_CONFIG_OUT..." @@ -126,7 +126,7 @@ awk -f setup_boostbook.awk $JAM_CONFIG_I rm -f setup_boostbook.awk echo "done."
-if [ x"$JAM_CONFIG_IN_TEMP" == "xyes" ]; then +if test x"$JAM_CONFIG_IN_TEMP" = "xyes"; then rm -f $JAM_CONFIG_IN fi
--- 8< ---
Here is the output indicating success.
--- 8< ---
$ ./setup_boostbook.sh
Downloading DocBook XSLT Stylesheets version 1.65.1...
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 1504k 100 1504k 0 0 28163 0 0:00:54 0:00:54 0:00:00 31956
Expanding DocBook XSLT Stylesheets into /cygdrive/c/pub/test_bb/docbook-xsl-1.65.1...done.
Downloading DocBook XML DTD version 4.2...
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 78428 100 78428 0 0 72618 0 0:00:01 0:00:01 0:00:00 85694
Expanding DocBook XML DTD into /cygdrive/c/pub/test_bb/docbook-dtd-4.2...done.
Updating Boost.Jam configuration in /home/vince/user-config.jam...done.
Done! Execute "bjam --v2" in a documentation directory to generate
documentation with BoostBook. If you have not already, you will need
to compile Boost.Jam.
--- 8< ---
-- Vince Virgilio
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Boost-docs mailing list
[EMAIL PROTECTED]
Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs
