#!/bin/bash

# Remove the directories to make sure that we don't have rebuild problems
# that can sometimes happen with doxygen

rm -r ../src/MoochoUtilities/doc/html

rm -r ../src/IterationPack/doc/html

rm -r ../src/RTOpPack/doc/html

rm -r ../src/DenseLinAlgPack/doc/html

rm -r ../src/AbstractLinAlgPack/doc/html

rm -r ../src/NLPInterfacePack/doc/html

rm -r ../src/ConstrainedOptPack/doc/html

rm -r ../src/MoochoPack/doc/html

rm -r ../thyra/doc/html

rm -r ../browser/doc/html

rm -r html

rm -r latex

# Create new directories manually since the doxygen exe under windows
# seems to be messing this up.

mkdir ../src/MoochoUtilities/doc/html

mkdir ../src/IterationPack/doc/html

mkdir ../src/RTOpPack/doc/html

mkdir ../src/DenseLinAlgPack/doc/html

mkdir ../src/AbstractLinAlgPack/doc/html

mkdir ../src/NLPInterfacePack/doc/html

mkdir ../src/ConstrainedOptPack/doc/html

mkdir ../src/MoochoPack/doc/html

mkdir ../thyra/doc/html

mkdir ../browser/doc/html

mkdir html

mkdir latex

# Build the documentation

./build_docs_guts
