#!/bin/sh
GRAMDIR=".."
VERSION="0.60"
TEANGA="ga"
UPPERTEANGA="GA"
AUTHOR=""
if [ ! -e ${GRAMDIR}/Makefile ]
then
        echo "configure: need to run ${GRAMDIR}/configure first"
	exit 1
fi
ECHO=`grep '^ECHO =' ${GRAMDIR}/Makefile | sed 's/^ECHO = *//'`
EGREP=`grep '^EGREP =' ${GRAMDIR}/Makefile | sed 's/^EGREP = *//'`
LN_S=`grep '^LN_S =' ${GRAMDIR}/Makefile | sed 's/^LN_S = *//'`
PERL=`grep '^PERL =' ${GRAMDIR}/Makefile | sed 's/^PERL = *//'`
GRAMVERSION=`grep '^TARBALL =' ${GRAMDIR}/Makefile | sed 's/^TARBALL = gramadoir-//'`
# the next batch of values are extracted from crubadan EOLAS file, so 
# changes should be made upstream also
NAME_ENG="Irish"
NATIVE="ISO-8859-1"
BDCHARS="A-Za-z0-9"
INTCHARS="'-"
UPPERS="A-Z"
LOWERS="a-z"
echo "configure: creating Makefile"
rm -f Makefile
sed "
s@!ECHO!@${ECHO}@
s@!EGREP!@${EGREP}@
s@!LN_S!@${LN_S}@
s@!PERL!@${PERL}@
s@!TEANGA!@${TEANGA}@
s@!UPPERTEANGA!@${UPPERTEANGA}@
s@!NAME_ENG!@${NAME_ENG}@
s@!VERSION!@${VERSION}@
s@!GRAMVERSION!@${GRAMVERSION}@
s@!NATIVE!@${NATIVE}@
s@!BDCHARS!@${BDCHARS}@
s@!INTCHARS!@${INTCHARS}@
s@!UPPERS!@${UPPERS}@
s@!LOWERS!@${LOWERS}@
s@!AUTHOR!@${AUTHOR}@
s@!GRAMDIR!@${GRAMDIR}@
" ${GRAMDIR}/Makefile-xx.in > Makefile
${PERL} -i -p -e "s@!PERLPATH!@${PERL}@" macra-ga.meta.pl
