Blame autogen.sh

Packit 1701cf
#!/bin/sh
Packit 1701cf
Packit 1701cf
[ -d config ] || mkdir config
Packit 1701cf
Packit 1701cf
version=$(git describe 2>/dev/null)
Packit 1701cf
Packit 1701cf
# No git? use changelog information
Packit 1701cf
if [ -z "$version" ]; then
Packit 1701cf
    version=$(grep '^[[:digit:]]' doc/changelog | head -n1 | cut -d: -f1)
Packit 1701cf
    date=$(grep '^[[:digit:]]' doc/changelog | head -n1 | cut -d: -f2)
Packit 1701cf
else
Packit 1701cf
    date=$(git log -1 --pretty="format:%ai" "$version")
Packit 1701cf
fi
Packit 1701cf
Packit 1701cf
cat << eof > configure.ac
Packit 1701cf
AC_INIT([gpm],[$version],[http://www.nico.schottelius.org/software/gpm/])
Packit 1701cf
Packit 1701cf
releasedate="$date"
Packit 1701cf
release="$version"
Packit 1701cf
eof
Packit 1701cf
Packit 1701cf
cat configure.ac.footer >> configure.ac
Packit 1701cf
Packit 1701cf
${ACLOCAL-aclocal} -I config
Packit 1701cf
${LIBTOOLIZE-libtoolize} -n --install 2>/dev/null && LIBTOOL_FLAGS="--install" || LIBTOOL_FLAGS=""
Packit 1701cf
${LIBTOOLIZE-libtoolize} --force --copy ${LIBTOOL_FLAGS}
Packit 1701cf
${AUTOHEADER-autoheader}
Packit 1701cf
${AUTOCONF-autoconf}