diff options
author | jhclark <jhclark@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-09-26 18:56:47 +0400 |
---|---|---|
committer | jhclark <jhclark@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-09-26 18:56:47 +0400 |
commit | 39747881cb55d52c9c8ba900554f55f213145e95 (patch) | |
tree | f12a5450989a7100aa16e22fed31efa4c5085608 /regenerate-makefiles.sh | |
parent | c89f11a29d4e5eb2f1c0e230a30779ceca7e484b (diff) |
Give more helpful error and status messages in regenerate-makefiles.sh
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4268 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'regenerate-makefiles.sh')
-rwxr-xr-x | regenerate-makefiles.sh | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/regenerate-makefiles.sh b/regenerate-makefiles.sh index 24e8f53f7..a498441ce 100755 --- a/regenerate-makefiles.sh +++ b/regenerate-makefiles.sh @@ -14,34 +14,50 @@ function die () { echo "$@" >&2 + + # Try to be as helpful as possible by detecting OS and making recommendations + if (( $(lsb_release -a | fgrep -ci "ubuntu") > 0 )); then + echo >&2 + echo >&2 "Need to install build autotools on Ubuntu? Use:" + echo >&2 "sudo aptitude install autoconf automake libtool build-essential" + fi + if (( $(uname -a | fgrep -ci "darwin") > 0 )); then + echo >&2 + echo >&2 "Having problems on Mac OSX?" + echo >&2 "You might have an old version of aclocal/automake. You'll need to upgrade these." + fi exit 1 } -if [ -z "$ACLOCAL" ] -then +if [ -z "$ACLOCAL" ]; then ACLOCAL=`which aclocal` + [ -n "$ACLOCAL" ] || die "aclocal not found on your system. Please install it or set $ACLOCAL" fi -if [ -z "$AUTOMAKE" ] -then +if [ -z "$AUTOMAKE" ]; then AUTOMAKE=`which automake` + [ -n "$AUTOMAKE" ] || die "automake not found on your system. Please install it or set $AUTOMAKE" fi -if [ -z "$AUTOCONF" ] -then +if [ -z "$AUTOCONF" ]; then AUTOCONF=`which autoconf` + [ -n "$AUTOCONF" ] || die "autoconf not found on your system. Please install it or set $AUTOCONF" fi -if [ -z "$LIBTOOLIZE" ] -then +if [ -z "$LIBTOOLIZE" ]; then LIBTOOLIZE=`which libtoolize` - if [ -z "$LIBTOOLIZE" ] - then + if [ -z "$LIBTOOLIZE" ]; then LIBTOOLIZE=`which glibtoolize` fi + + [ -n "$LIBTOOLIZE" ] || die "libtoolize/glibtoolize not found on your system. Please install it or set $LIBTOOLIZE" fi +echo >&2 "Detected aclocal: $($ACLOCAL --version | head -n1)" +echo >&2 "Detected autoconf: $($AUTOCONF --version | head -n1)" +echo >&2 "Detected automake: $($AUTOMAKE --version | head -n1)" +echo >&2 "Detected libtoolize: $($LIBTOOLIZE --version | head -n1)" echo "Calling $ACLOCAL..." $ACLOCAL -I m4 || die "aclocal failed" |