#! /bin/sh

# $Id: bootstrap,v 1.5 2005/01/26 20:19:40 joostvb Exp $

#
# See comment in Makefile.am on state of build system.
#

# A fake texi file so that automake can see what we want to do
test -f autobook.texi || cat > autobook.texi <<EOF
@setfilename fnord
@include version.texi
EOF

# make setup
aclocal-1.9
# tex will fail on our generated autobook.texi (the real one)
# if the texinfo.tex is the one as shipped with
# automake 1.7 (texinfoversion 2003-10-06.08) (and laters ones too,
# likely).  texinfo's (/usr/share/texmf/tex/texinfo/)texinfo.tex
# as shipped with automake 1.4 (texinfoversion 2002-06-04.06) is know
# to work.  Explicitly make the symlink now, before automake-1.9's
# --add-missing touches it.
test -f texinfo.tex || ln -s /usr/share/automake-1.4/texinfo.tex

# we _need_ automake > 1.4 for examples/Makefile.am
automake-1.9 --gnu --add-missing
autoconf

# Remove the fake texi file (if any)
grep "@setfilename fnord" autobook.texi >/dev/null 2>&1 \
  && rm -f autobook.texi

exit 0
