#!/bin/bash

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

rm -rf html

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

mkdir html

# Build the documentation

if [ $TRILINOS_HOME ]; then
  echo "TRILINOS_HOME has already been set!"
else
  echo "TRILINOS_HOME has not been set.  Setting it!"
  export TRILINOS_HOME=`pwd`/../../..
fi

echo
echo "Building main doxygen documentation page for domi ..."
echo

doxygen Doxyfile

# Files needed for collapsible parameter list (short term proof of concept)
#TODO:
mkdir html/common
cp -r ../../../doc/DocumentingParameterLists/webfiles html/common/parameterList
cp ../../../doc/DocumentingParameterLists/doc/copy_xml_to_src_html.py .
echo "DONE"
