summaryrefslogtreecommitdiff
path: root/third_party/waf/waflib/extras/make.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/waf/waflib/extras/make.py')
-rw-r--r--third_party/waf/waflib/extras/make.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/third_party/waf/waflib/extras/make.py b/third_party/waf/waflib/extras/make.py
index 8b99c4dd0e0..7b75d5511ba 100644
--- a/third_party/waf/waflib/extras/make.py
+++ b/third_party/waf/waflib/extras/make.py
@@ -1,3 +1,7 @@
+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
+
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2011 (ita)
@@ -48,7 +52,7 @@ class MakeContext(BuildContext):
for pat in self.files.split(','):
matcher = self.get_matcher(pat)
for tg in g:
- if isinstance(tg, Task.TaskBase):
+ if isinstance(tg, Task.Task):
lst = [tg]
else:
lst = tg.tasks
@@ -56,7 +60,7 @@ class MakeContext(BuildContext):
all_tasks.append(tsk)
do_exec = False
- for node in getattr(tsk, 'inputs', []):
+ for node in tsk.inputs:
try:
uses[node].append(tsk)
except:
@@ -66,7 +70,7 @@ class MakeContext(BuildContext):
do_exec = True
break
- for node in getattr(tsk, 'outputs', []):
+ for node in tsk.outputs:
try:
provides[node].append(tsk)
except:
@@ -86,14 +90,14 @@ class MakeContext(BuildContext):
result = all_tasks
else:
# this is like a big filter...
- result = set([])
- seen = set([])
+ result = set()
+ seen = set()
cur = set(tasks)
while cur:
result |= cur
- tosee = set([])
+ tosee = set()
for tsk in cur:
- for node in getattr(tsk, 'inputs', []):
+ for node in tsk.inputs:
if node in seen:
continue
seen.add(node)
@@ -129,9 +133,9 @@ class MakeContext(BuildContext):
pattern = re.compile(pat)
def match(node, output):
- if output == True and not out:
+ if output and not out:
return False
- if output == False and not inn:
+ if not output and not inn:
return False
if anode:
@@ -139,3 +143,4 @@ class MakeContext(BuildContext):
else:
return pattern.match(node.abspath())
return match
+