#!/bin/sh -e

# $Id: bootstrap 128 2004-03-25 10:16:16Z joostvb $

# bootstrap - script to bootstrap the distribution rolling engine

# Copyright (c) 2003 Joost van Baal

# This script is free software; you can distribute it and/or modify it
# under the terms of the GNU GPL.  See the file COPYING.

# Usage:
#
#  sh ./bootstrap && ./configure && make distcheck
#
# If you wanna force an update of the VERSION, run a
#
#  touch NEWS
#
# before the sh ./bootstrap .
#
# Both methods yield a tarball which one can install doing
#
# $ tar zxf PACKAGENAME-*.tar.gz
# $ cd PACKAGENAME-*
# $ ./configure
# $ make
# # make install

# requirements:
#  GNU autoconf, from e.g. ftp.gnu.org:/pub/gnu/autoconf/autoconf-2.50.tar.gz
#  GNU automake, from e.g. ftp.cygnus.com:/pub/tromey (automake 1.7.9 is
#    known to work)
#  svn2cl, a python script, as used in the GNU Enterprise project.
#    By jcater (Jason Cater), contributions by reinhard (Reinhard Müller).
#    Get it from
#    http://www.gnuenterprise.org/cgi-bin/viewcvs.cgi/*checkout*/gnue/trunk/gnue-common/utils/svn2cl .
#    svn2cl is used in Makefile.am too.

# (Another svn2cl implementation, in perl, is at
# http://www.contactor.se/~dast/svn/archive-2002-04/0910.shtml)

set -x

test -f ChangeLog || {
    touch ChangeLog && svn2cl ChangeLog
}

test -f VERSION.m4 || sh ./setversion

aclocal \
    && automake --add-missing --copy --verbose --gnu \
    && autoconf

