From: Anthony Minessale Date: Wed, 8 Feb 2006 21:32:03 +0000 (+0000) Subject: change build.sh to ensure gnu make X-Git-Tag: v1.0-beta1~3260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58d79a34cc77bf284d28e3fa7052beba47b74f24;p=thirdparty%2Ffreeswitch.git change build.sh to ensure gnu make git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@569 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/build.sh b/build.sh index f640770c28..4e01eb5b64 100755 --- a/build.sh +++ b/build.sh @@ -1 +1,32 @@ -make depends && make install modules install_mod +#!/bin/sh + +make=`which gmake 2>/dev/null || which make 2>/dev/null || make` +check=`($make --version 2>/dev/null | grep GNU) || echo bad` + +if [ "$check" = "bad" ] ; then + echo "Sorry, you need GNU make to build this application" + exit 1 +fi + +if [ -z $1 ] ; then + echo "Usage: $0 [--prefix=/prefix/dir>]" + echo + echo "The 'build' option will fully install the application to the given --prefix" + echo "The 'configure' option will reconfigure and exit." + echo + echo "The default --prefix is /usr/local/freeswitch" + exit 1 +fi + +if [ $1 = "configure" ] ; then + shift + ./configure $@ + exit 0 +fi + +if [ ! -f ./Makefile ] ; then + ./configure $@ +fi + +$make installall +