#!/bin/sh

#generate some boring Makefile.am
lst=`find src -name 'private' -o -name '@gf*' | xargs`
for i in $lst tests/private; do
    pushd $i
    f=`find . -name '*.m' | xargs`;
    popd
    ii=`basename $i`
    echo "EXTRA_DIST=$f" > $i/Makefile.am
    echo "toolboxdir=@TOOLBOXDIR@/$ii" >> $i/Makefile.am
    echo "toolbox_SCRIPTS=$f" >> $i/Makefile.am
done;
aclocal -I config --output=config/aclocal.m4
cp -f config/aclocal.m4 .
cp -f config/install-sh .
autoconf -I config
#pas de ./ devant les noms des makefiles !!!
automake -a --gnu `find . -name Makefile.am | sed -e 's@\./\(.*\)\.am@\1@g'`


