#!/bin/sh -e

# This file is maintained at http://git.mdcc.cx/caspar

# bootstrap - script to bootstrap the distribution rolling engine

# 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:
# ./bootstrap && ./configure && make distcheck
#
# this yields a tarball (and a .tar.bz2 too) 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/
#  GNU automake, from e.g. ftp.cygnus.com:/pub/tromey/
#  git2cl, from e.g. http://josefsson.org/git2cl/, and git

set -x

test -f ChangeLog || {
    # we want no unprotected emailadresses in the cl
    git log --pretty --numstat --summary | sed 's/<[^>][^>]*>//g' | \
      git2cl > ChangeLog
}

test -f VERSION.m4 || ./setversion

AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf --install --symlink
