From 04a0c9d91d6ea9c54c38d2e3e8f16c60a3ba4e8b Mon Sep 17 00:00:00 2001 From: wilsonianb Date: Tue, 20 Dec 2016 14:44:43 -0800 Subject: [PATCH] Add documentation building instructions --- CHANGELOG.md | 1 + doc/Dockerfile | 22 +++++++++++++++ doc/README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 doc/Dockerfile create mode 100644 doc/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 73f6979c..ed2f4064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ 1.0.0-b27 * Tidy up tests and docs +* Add documentation building instructions API Changes: diff --git a/doc/Dockerfile b/doc/Dockerfile new file mode 100644 index 00000000..46ba0ee3 --- /dev/null +++ b/doc/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get -y install build-essential g++ git libbz2-dev wget python-dev + +# Install Boost +ENV BOOST_SHA 440a59f8bc4023dbe6285c9998b0f7fa288468b889746b1ef00e8b36c559dce1 +RUN wget https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.gz +RUN echo "$BOOST_SHA boost_1_62_0.tar.gz" | sha256sum -c +RUN tar xzf boost_1_62_0.tar.gz +RUN cd boost_1_62_0 && ./bootstrap.sh --prefix=/usr/local +RUN cd boost_1_62_0 && ./b2 install +ENV BOOST_ROOT=/boost_1_62_0 + +# Install dependencies +RUN apt-get -y install doxygen +RUN apt-get -y install xsltproc + +CMD cd /opt/beast/doc && \ + chmod +x makeqbk.sh && \ + ./makeqbk.sh && \ + $BOOST_ROOT/b2 diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 00000000..02a9c555 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,72 @@ +# Building documentation + +## Specifying Files + +To specify the source files for which to build documentation, modify `INPUT` +and its related fields in `doc/source.dox`. Note that the `INPUT` paths are +relative to the `doc/` directory. + +## Install Dependencies + +### Windows + +Install these dependencies: + +1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html) +2. Download the following zip files from [xsltproc](https://www.zlatkovic.com/pub/libxml/) + (Alternate download: ftp://ftp.zlatkovic.com/libxml/), + and extract the `bin\` folder contents into any folder in your path. + * iconv + * libxml2 + * libxslt + * zlib +3. Download [Boost](http://www.boost.org/users/download/) + 1. Extract the compressed file contents to your (new) `$BOOST_ROOT` location. + 2. Open a command prompt or shell in the `$BOOST_ROOT`. + 3. `./bootstrap.bat` + 4. If it is not already there, add your `$BOOST_ROOT` to your environment `$PATH`. + +### MacOS + +1. Install doxygen: + * Use homebrew to install: `brew install doxygen`. The executable will be + installed in `/usr/local/bin` which is already in your path. + * Alternatively, install from here: [doxygen](http://www.stack.nl/~dimitri/doxygen/download.html). + You'll then need to make doxygen available to your command line. You can + do this by adding a symbolic link from `/usr/local/bin` to the doxygen + executable. For example, `$ ln -s /Applications/Doxygen.app/Contents/Resources/doxygen /usr/local/bin/doxygen` +2. Install [Boost](http://www.boost.org/users/download/) + 1. Extract the compressed file contents to your (new) `$BOOST_ROOT` location. + 2. Open a command prompt or shell in the `$BOOST_ROOT`. + 3. `$ ./bootstrap.bat` + 4. If it is not already there, add your `$BOOST_ROOT` to your environment + `$PATH`. This makes the `b2` command available to the command line. +3. That should be all that's required. In OS X 10.11, at least, libxml2 and + libxslt come pre-installed. + +### Linux + +1. Install [Docker](https://docs.docker.com/engine/installation/) +2. Build Docker image. From the Beast root folder: +``` +sudo docker build -t beast-docs doc/ +``` + +## Do it + +### Windows & MacOS + +From the Beast root folder: +``` +cd doc +./makeqbk.sh && b2 +``` +The output will be in `doc/html`. + +### Linux + +From the Beast root folder: +``` +sudo docker run -v $PWD:/opt/beast --rm beast-docs +``` +The output will be in `doc/html`.