diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2014-07-16 15:31:14 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2014-07-16 15:31:14 +0200 |
commit | 8a4ad11a45a807c58e007ad9cd9184c69563de21 (patch) | |
tree | 33aaa561b01344ef1eeffe99f6918bdd5d9a632b /autogen.sh | |
parent | 82245d1bae70e22d26187d584d2342036f1f43f3 (diff) | |
download | tracker-8a4ad11a45a807c58e007ad9cd9184c69563de21.tar.gz |
build: Require gnome-common and build a proper Changelog
Includes further fixes for "make distcheck"
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 59 |
1 files changed, 14 insertions, 45 deletions
diff --git a/autogen.sh b/autogen.sh index 8e016e9b9..e5de9f63d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,55 +1,24 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. -# -# NOTE: compare_versions() is stolen from gnome-autogen.sh -REQUIRED_VALA_VERSION=0.18.0 +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. -# Usage: -# compare_versions MIN_VERSION ACTUAL_VERSION -# returns true if ACTUAL_VERSION >= MIN_VERSION -compare_versions() { - ch_min_version=$1 - ch_actual_version=$2 - ch_status=0 - IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." - set $ch_actual_version - for ch_min in $ch_min_version; do - ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes - if [ -z "$ch_min" ]; then break; fi - if [ -z "$ch_cur" ]; then ch_status=1; break; fi - if [ $ch_cur -gt $ch_min ]; then break; fi - if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi - done - IFS="$ch_save_IFS" - return $ch_status -} - -# Vala version check -test -z "$VALAC" && VALAC=valac -VALA_VERSION=`$VALAC --version | cut -d" " -f2` +PKG_NAME="tracker" -if [ -z "$VALA_VERSION" ]; then - echo "**Error**: valac not installed or broken. You must have valac >= $REQUIRED_VALA_VERSION" - echo "installed to build." +(test -f $srcdir/configure.ac \ + && test -f $srcdir/autogen.sh) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level $PKG_NAME directory" exit 1 -fi +} -echo "Found Vala $VALA_VERSION" +DIE=0 -if ! compare_versions $REQUIRED_VALA_VERSION $VALA_VERSION; then - echo "**Error**: You must have valac >= $REQUIRED_VALA_VERSION installed to build, you have $VALA_VERSION" - exit 1 +if ! which gnome-autogen.sh ; then + echo "You need to install the gnome-common module and make" + echo "sure the gnome-autogen.sh script is in your \$PATH." + exit 1 fi -# Generate required files -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. -( - cd "$srcdir" && - touch ChangeLog && # Automake requires that ChangeLog exist - gtkdocize --flavour no-tmpl && - autopoint --force && - AUTOPOINT='intltoolize --automake --copy' autoreconf --verbose --force --install -) || exit -test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" +. gnome-autogen.sh |