#!/bin/sh

# Make documentation and place it where it will appear on the web:

TARGET=$HOME/kochanski.org/gpk/code/speechresearch/gmisclib
MODS=$(echo *.py | tr ' ' '\012' | grep -v setup.py)
OMODS=$(echo *.pyx | tr ' ' '\012' | sed -e 's/[.]pyx$//' -e 's/^/gmisclib./')
SCRIPTS='bin/select_fiat_entries.py bin/gpk_wavio.py bin/mcmc.py bin/q3html.py bin/run_several.py'

rm -rf $TARGET
mkdir -p $TARGET
test -d $TARGET &&
  epydoc -v --config epydoc.config --html -o $TARGET --show-imports $OMODS $MODS $SCRIPTS \
	--exclude-introspect g_pylab

test -d doc || mkdir doc
epydoc -v --config epydoc.config --pdf -o doc --show-imports $OMODS $MODS $SCRIPTS \
	--exclude-introspect g_pylab
mv doc/api.pdf .

chmod -R a+r $TARGET
find $TARGET -type d -exec chmod a+x {} \;
