#!/bin/sh 
#
# Configure and make from fresh CVS checkout, or cvs update
#
# $Id: CVSMake,v 1.12 2000/04/11 21:29:02 rwscott Exp $
#
lynx -dump doc/www.lesstif.org/INSTALL.html >INSTALL 2>/dev/null || sed -e 's/<[^<>]*>//g' doc/www.lesstif.org/INSTALL.html >INSTALL

SUBDIRS=`grep AC_CONFIG_SUBDIRS configure.in | sed -e's/^.*(//' -e's/)$//'`
echo "Autofoo in top..."
(libtoolize --force && aclocal && autoheader && automake -a -i && autoconf)

for i in $SUBDIRS
do
    if test -f $i/CVSMake
    then
	echo "Autofoo in $i"
	(cd $i && ./CVSMake)
    fi
done

if test -d test
then
    echo "Autofoo in test..."
    (cd test && ./mklinks)
    (cd test && libtoolize --force && aclocal && autoheader && automake -a -i && autoconf)
fi
