build:wafsamba: Remove the print_commands code from the build scripts
authorThomas Nagy <tnagy@waf.io>
Thu, 5 Nov 2015 18:00:18 +0000 (19:00 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Nov 2015 09:37:24 +0000 (10:37 +0100)
Using the print_commands tool makes it easier to upgrade to Waf 1.8.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni uri@samba.org
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_utils.py
buildtools/wafsamba/wscript

index fbe89f06f027fa050d70563080284fafb1106f70..49a87597a9f83d6cf957412a36d72da9d7fb5c2d 100644 (file)
@@ -119,27 +119,6 @@ def dict_concat(d1, d2):
         if t not in d1:
             d1[t] = d2[t]
 
-
-def exec_command(self, cmd, **kw):
-    '''this overrides the 'waf -v' debug output to be in a nice
-    unix like format instead of a python list.
-    Thanks to ita on #waf for this'''
-    _cmd = cmd
-    if isinstance(cmd, list):
-        _cmd = ' '.join(cmd)
-    debug('runner: %s' % _cmd)
-    if self.log:
-        self.log.write('%s\n' % cmd)
-        kw['log'] = self.log
-    try:
-        if not kw.get('cwd', None):
-            kw['cwd'] = self.cwd
-    except AttributeError:
-        self.cwd = kw['cwd'] = self.bldnode.abspath()
-    return Utils.exec_command(cmd, **kw)
-Build.BuildContext.exec_command = exec_command
-
-
 def ADD_COMMAND(opt, name, function):
     '''add a new top level command to waf'''
     Utils.g_module.__dict__[name] = function
index 6df3c57fa35bb832fa23cf301c58786c8d265c16..a4cb620babc2a1b7b7e5ee05198048825de320a2 100755 (executable)
@@ -216,6 +216,7 @@ def configure(conf):
     # load our local waf extensions
     conf.check_tool('gnu_dirs')
     conf.check_tool('wafsamba')
+    conf.check_tool('print_commands')
 
     conf.CHECK_CC_ENV()