build: fixed issue with CC="ccache cc" on solaris
authorAndrew Tridgell <tridge@samba.org>
Sun, 21 Mar 2010 13:50:14 +0000 (09:50 -0400)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:58 +0000 (20:26 +1000)
buildtools/waf-svn
buildtools/wafsamba/samba_autoconf.py
lib/replace/wscript

index 983a5a9e680fb912f49a24e410dc201b7252e2cf..7dbc81a86c25606a08b50b844b6f81d0bf0435b0 100755 (executable)
Binary files a/buildtools/waf-svn and b/buildtools/waf-svn differ
index e91409e0a4062d629b911a6d8b60b5a009abbcb5..1c1095ea475647e61a520d35a7cf25e155282ba5 100644 (file)
@@ -418,3 +418,13 @@ def CHECK_RPATH_SUPPORT(conf):
                            execute=True,
                            msg='Checking for rpath support',
                            cflags='-Wl,-rpath=.')
+
+@conf
+def CHECK_CC_ENV(conf):
+    '''trim whitespaces from 'CC'.
+    The build farm sometimes puts a space at the start'''
+    if os.environ.get('CC'):
+        conf.env.CC = TO_LIST(os.environ.get('CC'))
+        if len(conf.env.CC) == 1:
+            # make for nicer logs if just a single command
+            conf.env.CC = conf.env.CC[0]
index d54e18b26b3c58de90bff4769d4b12ebcc1890c6..97e5534d5db897d49b72384c3b6082f5f3c4cceb 100644 (file)
@@ -57,11 +57,7 @@ def configure(conf):
     # load our local waf extensions
     conf.check_tool('wafsamba', tooldir=conf.srcdir + "/buildtools/wafsamba")
 
-    # trim whitespaces from 'CC'.
-    # The build farm sometimes puts a space at the start
-    if os.environ.get('CC'):
-        conf.env['CC'] = os.environ.get('CC').strip()
-        os.environ['CC'] = conf.env['CC']
+    conf.CHECK_CC_ENV()
 
     conf.check_tool('compiler_cc')