#!/bin/bash

echo
echo "Generating main moocho doxygen documentation page ..."
echo

doxygen Doxyfile

echo
echo "Generating main moocho doxygen documentation page as a PDF file ..."
echo

doxygen DoxyfileLatex
cd latex
cat refman.tex | sed 's/\({doxygen}\)/{doxygen}\\raggedright/g' > refman.tex.tmp
cp refman.tex.tmp refman.tex
make
cp refman.pdf ../html/MoochoReference.pdf
cd ..

echo
echo "Generating the overview document for MOOCHO ..."
echo

cd overview
latex MoochoOverview.tex
latex MoochoOverview.tex
dvipdft MoochoOverview
cp MoochoOverview.pdf ../html/MoochoOverview.pdf
cd ..
