#!/bin/sh

set -ev

sh autogen.sh --without-doc # --verbose

version=`grep PACKAGE_VERSION config.h |cut -d' ' -f3 |tr -d \"`
distdir="meep-$version"
tarfile="${distdir}.tar.gz"

make dist

tar xzf $tarfile
rm $tarfile

pushd $distdir
mkdir OBJ
cd OBJ
../configure --with-doc # --disable-static --enable-shared
make
make check
popd

rm -rf $distdir */latest_output
