summaryrefslogtreecommitdiff
path: root/third_party/waf/waflib/extras/make.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2018-01-31 11:48:43 +0200
committerAndrew Bartlett <abartlet@samba.org>2018-09-05 06:37:22 +0200
commit4e65b33c1d40bb2c243f775f388056aed31d8671 (patch)
tree5a41b6ddef7ce1c0b6a93bcc16ef89da10f080e8 /third_party/waf/waflib/extras/make.py
parentfaef27506977db01cc4619140a71652463914378 (diff)
downloadsamba-4e65b33c1d40bb2c243f775f388056aed31d8671.tar.gz
third_party:waf: update to upstream 2.0.4 release
Update third_party/waf/ to 2.0.4 to bring us closer to Python 3 This change requires a number of changes in buildtools/ too. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
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
+