diff options
author | Edward Hervey <edward@collabora.com> | 2013-11-20 12:02:13 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2014-02-06 10:02:42 +0100 |
commit | 2b07be8c6e5739d58c0741f8b04769abc423d421 (patch) | |
tree | f5974a9d9b6acafb15c507fe4ee0523579cef3c6 | |
parent | 02d106024560a213fceb76d024064c0afbbe2f28 (diff) |
config: Handle ccache
Handles the case where the compiler was not specified beforehand
-rw-r--r-- | config/linux.config | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/linux.config b/config/linux.config index 174a512b..381bb33c 100644 --- a/config/linux.config +++ b/config/linux.config @@ -28,5 +28,9 @@ os.environ['am_cv_python_pyexecdir'] = '%s/%s/site-packages' % (prefix, py_prefi os.environ['am_cv_python_pythondir'] = '%s/%s/site-packages' % (prefix, py_prefix) if use_ccache: - os.environ['CC'] += 'ccache gcc' - os.environ['CXX'] += 'ccache g++' + comp = os.environ.get('CC', 'gcc') + if not 'ccache' in comp: + os.environ['CC'] = 'ccache ' + comp + comp = os.environ.get('CXX', 'g++') + if not 'ccache' in comp: + os.environ['CXX'] = 'ccache ' + comp |