#!/bin/bash

# change this regarding to your doxygen installation (here is Mac OSX)
DOXYGEN_BIN="/Applications/Doxygen.app/Contents/Resources/doxygen"
DOXY_STYLE_PLUS_PATH="doc/doxygen-style"
SOURCE_ROOT="."

for doxy_config_file in `find . -name *.doxyfile` 
do
# generate doxygen HTML output for any config file with doxyfile extention in subdirectories
$DOXYGEN_BIN $doxy_config_file 
done 

# cp "$DOXY_STYLE_PLUS_PATH/doxygen.css" "$SOURCE_ROOT/doc/html/doxygen.css"
# cp "$DOXY_STYLE_PLUS_PATH/background_navigation.png" "$SOURCE_ROOT/doc/html/background_navigation.png"
# cp "$DOXY_STYLE_PLUS_PATH/img_downArrow.png" "$SOURCE_ROOT/doc/html/img_downArrow.png"
# cp "$DOXY_STYLE_PLUS_PATH/tabs.css" "$SOURCE_ROOT/doc/html/tabs.css"

# now generate p7 specification HTML output
`perl p7/p7spectohtml.pl p7/examples/wired.xml > p7/wired.html`