summaryrefslogtreecommitdiff
path: root/BUILD/compile-dist
diff options
context:
space:
mode:
Diffstat (limited to 'BUILD/compile-dist')
-rwxr-xr-xBUILD/compile-dist36
1 files changed, 28 insertions, 8 deletions
diff --git a/BUILD/compile-dist b/BUILD/compile-dist
index 613f2643c56..7c2dbe00dc5 100755
--- a/BUILD/compile-dist
+++ b/BUILD/compile-dist
@@ -15,30 +15,49 @@ autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
+gmake=
+for x in gmake gnumake make; do
+ if $x --version 2>/dev/null | grep GNU > /dev/null; then
+ gmake=$x
+ break;
+ fi
+done
+
+if [ -z "$gmake" ]; then
+ # Our build may not depend on GNU make, but I wouldn't count on it
+ echo "Please install GNU make, and ensure it is in your path as gnumake, gmake, or make" >&2
+ exit 2
+fi
+
# Default to gcc for CC and CXX
if test -z "$CXX" ; then
- export CXX=gcc
+ export CXX
+ CXX=gcc
# Set some required compile options
if test -z "$CXXFLAGS" ; then
- export CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
+ export CXXFLAGS
+ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
fi
fi
if test -z "$CC" ; then
- export CC=gcc
+ export CC
+ CC=gcc
fi
# Use ccache, if available
if ccache -V > /dev/null 2>&1
then
- if ! (echo "$CC" | grep "ccache" > /dev/null)
+ if echo "$CC" | grep -v ccache > /dev/null
then
- export CC="ccache $CC"
+ export CC
+ CC="ccache $CC"
fi
- if ! (echo "$CXX" | grep "ccache" > /dev/null)
+ if echo "$CXX" | grep -v ccache > /dev/null
then
- export CXX="ccache $CXX"
+ export CXX
+ CXX="ccache $CXX"
fi
fi
@@ -50,4 +69,5 @@ fi
--enable-thread-safe-client \
--with-extra-charsets=complex \
--with-ndbcluster
-make
+
+$gmake