diff options
author | Andrew Bartlett <abartlet@samba.org> | 2016-04-01 16:18:59 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2016-04-01 16:18:59 +1300 |
commit | a29dfa19c8b8bd17f24ebcb6cb8be81165611236 (patch) | |
tree | 49027526bb774df79625ab58f7026e0da99a5f80 /third_party | |
parent | 9c99dc8ffb5f82f2a7fc3af0368aed7f67af45b8 (diff) |
Imported Upstream version 2.1.6
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/waf/wafadmin/3rdparty/gccdeps.py | 2 | ||||
-rw-r--r-- | third_party/waf/wafadmin/3rdparty/print_commands.py | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/third_party/waf/wafadmin/3rdparty/gccdeps.py b/third_party/waf/wafadmin/3rdparty/gccdeps.py index 28a889d..55cd515 100644 --- a/third_party/waf/wafadmin/3rdparty/gccdeps.py +++ b/third_party/waf/wafadmin/3rdparty/gccdeps.py @@ -15,7 +15,7 @@ lock = threading.Lock() preprocessor_flag = '-MD' -@feature('cc') +@feature('cc', 'c') @before('apply_core') def add_mmd_cc(self): if self.env.get_flat('CCFLAGS').find(preprocessor_flag) < 0: diff --git a/third_party/waf/wafadmin/3rdparty/print_commands.py b/third_party/waf/wafadmin/3rdparty/print_commands.py new file mode 100644 index 0000000..3b12aa3 --- /dev/null +++ b/third_party/waf/wafadmin/3rdparty/print_commands.py @@ -0,0 +1,25 @@ +#! /usr/bin/env python + +""" +In this case, print the commands being executed as strings +(the commands are usually lists, so this can be misleading) +""" + +import Build, Utils, Logs + +def exec_command(self, cmd, **kw): + txt = cmd + if isinstance(cmd, list): + txt = ' '.join(cmd) + Logs.debug('runner: %s' % txt) + 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 + |