diff options
author | unknown <guilhem@mysql.com> | 2003-05-23 18:20:57 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-05-23 18:20:57 +0200 |
commit | 4198322bef9550577d317046b642ccaa6f0f0702 (patch) | |
tree | d9c82dd4b92dfe56116d81830fec90257d51dd56 /BUILD | |
parent | d57d45bb10b04a3fdea3f2c4aa3772893f5393bf (diff) | |
download | mariadb-git-4198322bef9550577d317046b642ccaa6f0f0702.tar.gz |
Outcome of discussions with Lenz and Monty about handling ccache in the build commands.
BUILD/SETUP.sh:
Quote $CXX to make a test work even if CXX had spaces in it.
Automatically add ccache to CC and CXX if ccache is present.
configure.in:
Accept "ccache gcc" in the test.
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD/SETUP.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 55b82e38d63..150f9e28b41 100644 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -71,6 +71,22 @@ else make=make fi -if test -z $CXX ; then +if test -z "$CXX" ; then CXX=gcc fi + +# If ccache (a compiler cache which reduces build time) +# (http://samba.org/ccache) is installed, use it. +# We use 'grep' and hope 'grep' will work as expected +# (returns 0 if finds lines) +if ccache -V > /dev/null 2>&1 +then + if ! (echo "$CC" | grep "ccache" > /dev/null) + then + CC="ccache $CC" + fi + if ! (echo "$CXX" | grep "ccache" > /dev/null) + then + CXX="ccache $CXX" + fi +fi |