diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-01-04 00:31:27 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-01-04 22:34:20 +0100 |
commit | 4f4bce5301ffd8c12aed1b108affa1a75feefb67 (patch) | |
tree | 1607accd70a2c37a9b996f7b42ec926b014cfe5b /buildtools/wafadmin/3rdparty/paranoid.py | |
parent | 1b45f2aed86dda9fda6e6bcf1c9c7cbdc471c18d (diff) | |
download | samba-4f4bce5301ffd8c12aed1b108affa1a75feefb67.tar.gz samba-4f4bce5301ffd8c12aed1b108affa1a75feefb67.tar.bz2 samba-4f4bce5301ffd8c12aed1b108affa1a75feefb67.zip |
Include waf as an extracted source directory, rather than as a one-in-a-file script.
Diffstat (limited to 'buildtools/wafadmin/3rdparty/paranoid.py')
-rw-r--r-- | buildtools/wafadmin/3rdparty/paranoid.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/buildtools/wafadmin/3rdparty/paranoid.py b/buildtools/wafadmin/3rdparty/paranoid.py new file mode 100644 index 0000000000..ead64ea5c3 --- /dev/null +++ b/buildtools/wafadmin/3rdparty/paranoid.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +# encoding: utf-8 +# ita 2010 + +import Logs, Utils, Build, Task + +def say(txt): + Logs.warn("^o^: %s" % txt) + +try: + ret = Utils.cmd_output('which cowsay 2> /dev/null').strip() +except Exception, e: + pass +else: + def say(txt): + f = Utils.cmd_output([ret, txt]) + Utils.pprint('PINK', f) + +say('you make the errors, we detect them') + +def check_task_classes(self): + for x in Task.TaskBase.classes: + if isinstance(x, Task.Task): + if not getattr(cls, 'ext_in', None) or getattr(cls, 'before', None): + say('class %s has no precedence constraints (ext_in/before)') + if not getattr(cls, 'ext_out', None) or getattr(cls, 'after', None): + say('class %s has no precedence constraints (ext_out/after)') + +comp = Build.BuildContext.compile +def compile(self): + if not getattr(self, 'magic', None): + check_task_classes(self) + return comp(self) +Build.BuildContext.compile = compile + |