Skip to content

Commit 01f7d44

Browse files
committed
Upgrade to WAF 1.5.15
1 parent ec0266a commit 01f7d44

File tree

23 files changed

+193
-96
lines changed

23 files changed

+193
-96
lines changed

bin/node-waf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ t = join(w, 'Tools')
1212
sys.path = [w, t] + sys.path
1313

1414
import Scripting
15-
VERSION="1.5.14"
15+
VERSION="1.5.15"
1616
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
1717
sys.exit(0)

tools/waf-light

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if 'PSYCOWAF' in os.environ:
3737
try:import psyco;psyco.full()
3838
except:pass
3939

40-
VERSION="1.5.14"
40+
VERSION="1.5.15"
4141
REVISION="x"
4242
INSTALL="x"
4343
C1='x'

tools/wafadmin/Build.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,13 @@ def flush(self, all=1):
681681
for i in xrange(len(self.task_manager.groups)):
682682
g = self.task_manager.groups[i]
683683
self.task_manager.current_group = i
684+
if Logs.verbose:
685+
Logs.debug('group: group %s' % ([x for x in self.task_manager.groups_names if id(self.task_manager.groups_names[x]) == id(g)][0]))
686+
684687
for tg in g.tasks_gen:
685688
if id(tg) in to_compile:
689+
if Logs.verbose:
690+
Logs.debug('group: %s' % tg)
686691
tg.post()
687692

688693
else:
@@ -702,9 +707,13 @@ def flush(self, all=1):
702707
for i in xrange(len(self.task_manager.groups)):
703708
g = self.task_manager.groups[i]
704709
self.task_manager.current_group = i
710+
if Logs.verbose:
711+
Logs.debug('group: group %s' % ([x for x in self.task_manager.groups_names if id(self.task_manager.groups_names[x]) == id(g)][0]))
705712
for tg in g.tasks_gen:
706713
if not tg.path.is_child_of(ln):
707714
continue
715+
if Logs.verbose:
716+
Logs.debug('group: %s' % tg)
708717
tg.post()
709718

710719
def env_of_name(self, name):

tools/wafadmin/Configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def post_init(self):
125125
except (OSError, IOError):
126126
self.fatal('could not open %r for writing' % path)
127127

128-
app = getattr(Utils.g_module, 'APPNAME', '')
128+
app = Utils.g_module.APPNAME
129129
if app:
130130
ver = getattr(Utils.g_module, 'VERSION', '')
131131
if ver:

tools/wafadmin/Constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"""
1010

1111
# do not touch these three lines, they are updated automatically
12-
HEXVERSION = 0x105014
13-
WAFVERSION="1.5.14"
14-
WAFREVISION = "7363M"
12+
HEXVERSION = 0x105015
13+
WAFVERSION="1.5.15"
14+
WAFREVISION = "7505M"
1515
ABI = 7
1616

1717
# permissions

tools/wafadmin/Node.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def find_or_declare(self, lst):
204204
if node:
205205
tp = node.id & 3
206206
if tp != BUILD:
207-
raise Utils.WafError("find_or_declare returns a build node, not a source nor a directory %r" % lst)
207+
raise Utils.WafError('find_or_declare cannot return a build node (build files in the source directory %r?)' % lst)
208208
return node
209209
node = self.__class__(name, parent, BUILD)
210210
return node
@@ -461,8 +461,9 @@ def bldpath(self, env=None):
461461
"path seen from the build dir default/src/foo.cpp"
462462
if self.id & 3 == FILE:
463463
return self.relpath_gen(self.__class__.bld.bldnode)
464-
if self.path_to_parent(self.__class__.bld.srcnode) is not '':
465-
return os.path.join(env.variant(), self.path_to_parent(self.__class__.bld.srcnode))
464+
p = self.path_to_parent(self.__class__.bld.srcnode)
465+
if p is not '':
466+
return env.variant() + os.sep + p
466467
return env.variant()
467468

468469
def srcpath(self, env=None):

tools/wafadmin/Runner.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,15 @@ def start(self):
190190
try:
191191
st = tsk.runnable_status()
192192
except Exception, e:
193-
tsk.err_msg = Utils.ex_stack()
194-
tsk.hasrun = EXCEPTION
195193
self.processed += 1
194+
if self.stop and not Options.options.keep:
195+
tsk.hasrun = SKIPPED
196+
self.manager.add_finished(tsk)
197+
continue
196198
self.error_handler(tsk)
197199
self.manager.add_finished(tsk)
200+
tsk.hasrun = EXCEPTION
201+
tsk.err_msg = Utils.ex_stack()
198202
continue
199203

200204
if st == ASK_LATER:

tools/wafadmin/Scripting.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def build_impl(bld):
412412

413413
bld.install()
414414

415-
excludes = '.bzr .bzrignore .git .gitignore .svn CVS .cvsignore .arch-ids {arch} SCCS BitKeeper .hg _MTN _darcs Makefile Makefile.in config.log'.split()
415+
excludes = '.bzr .bzrignore .git .gitignore .svn CVS .cvsignore .arch-ids {arch} SCCS BitKeeper .hg _MTN _darcs Makefile Makefile.in config.log .gitattributes .hgignore .hgtags'.split()
416416
dist_exts = '~ .rej .orig .pyc .pyo .bak .tar.bz2 tar.gz .zip .swp'.split()
417417
def dont_dist(name, src, build_dir):
418418
global excludes, dist_exts
@@ -486,8 +486,8 @@ def dist(appname='', version=''):
486486
# return return (distdirname, tarballname)
487487
import tarfile
488488

489-
if not appname: appname = getattr(Utils.g_module, APPNAME, 'noname')
490-
if not version: version = getattr(Utils.g_module, VERSION, '1.0')
489+
if not appname: appname = Utils.g_module.APPNAME
490+
if not version: version = Utils.g_module.VERSION
491491

492492
tmp_folder = appname + '-' + version
493493
if g_gz in ['gz', 'bz2']:
@@ -545,8 +545,8 @@ def distcheck(appname='', version=''):
545545
'''checks if the sources compile (tarball from 'dist')'''
546546
import tempfile, tarfile
547547

548-
if not appname: appname = getattr(Utils.g_module, APPNAME, 'noname')
549-
if not version: version = getattr(Utils.g_module, VERSION, '1.0')
548+
if not appname: appname = Utils.g_module.APPNAME
549+
if not version: version = Utils.g_module.VERSION
550550

551551
waf = os.path.abspath(sys.argv[0])
552552
tarball = dist(appname, version)

tools/wafadmin/Task.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -578,22 +578,25 @@ def signature(self):
578578
try: return self.cache_sig[0]
579579
except AttributeError: pass
580580

581-
m = md5()
581+
self.m = md5()
582582

583583
# explicit deps
584584
exp_sig = self.sig_explicit_deps()
585-
m.update(exp_sig)
586-
587-
# implicit deps
588-
imp_sig = self.scan and self.sig_implicit_deps() or SIG_NIL
589-
m.update(imp_sig)
590585

591586
# env vars
592587
var_sig = self.sig_vars()
593-
m.update(var_sig)
588+
589+
# implicit deps
590+
591+
imp_sig = SIG_NIL
592+
if self.scan:
593+
try:
594+
imp_sig = self.sig_implicit_deps()
595+
except ValueError:
596+
return self.signature()
594597

595598
# we now have the signature (first element) and the details (for debugging)
596-
ret = m.digest()
599+
ret = self.m.digest()
597600
self.cache_sig = (ret, exp_sig, imp_sig, var_sig)
598601
return ret
599602

@@ -771,7 +774,7 @@ def v(x):
771774

772775
def sig_explicit_deps(self):
773776
bld = self.generator.bld
774-
m = md5()
777+
up = self.m.update
775778

776779
# the inputs
777780
for x in self.inputs + getattr(self, 'dep_nodes', []):
@@ -780,7 +783,7 @@ def sig_explicit_deps(self):
780783

781784
variant = x.variant(self.env)
782785
try:
783-
m.update(bld.node_sigs[variant][x.id])
786+
up(bld.node_sigs[variant][x.id])
784787
except KeyError:
785788
raise Utils.WafError('Missing node signature for %r (required by %r)' % (x, self))
786789

@@ -803,29 +806,28 @@ def sig_explicit_deps(self):
803806
raise Utils.WafError('Missing node signature for %r (required by %r)' % (v, self))
804807
elif hasattr(v, '__call__'):
805808
v = v() # dependency is a function, call it
806-
m.update(v)
809+
up(v)
807810

808811
for x in self.deps_nodes:
809812
v = bld.node_sigs[x.variant(self.env)][x.id]
810-
m.update(v)
813+
up(v)
811814

812-
return m.digest()
815+
return self.m.digest()
813816

814817
def sig_vars(self):
815-
m = md5()
816818
bld = self.generator.bld
817819
env = self.env
818820

819821
# dependencies on the environment vars
820822
act_sig = bld.hash_env_vars(env, self.__class__.vars)
821-
m.update(act_sig)
823+
self.m.update(act_sig)
822824

823825
# additional variable dependencies, if provided
824826
dep_vars = getattr(self, 'dep_vars', None)
825827
if dep_vars:
826-
m.update(bld.hash_env_vars(env, dep_vars))
828+
self.m.update(bld.hash_env_vars(env, dep_vars))
827829

828-
return m.digest()
830+
return self.m.digest()
829831

830832
#def scan(self, node):
831833
# """this method returns a tuple containing:
@@ -852,6 +854,8 @@ def sig_implicit_deps(self):
852854
return prev_sigs[2]
853855
except (KeyError, OSError):
854856
pass
857+
del bld.task_sigs[key]
858+
raise ValueError('rescan')
855859

856860
# no previous run or the signature of the dependencies has changed, rescan the dependencies
857861
(nodes, names) = self.scan()
@@ -878,8 +882,7 @@ def compute_sig_implicit_deps(self):
878882
"""it is intended for .cpp and inferred .h files
879883
there is a single list (no tree traversal)
880884
this is the hot spot so ... do not touch"""
881-
m = md5()
882-
upd = m.update
885+
upd = self.m.update
883886

884887
bld = self.generator.bld
885888
tstamp = bld.node_sigs
@@ -897,7 +900,7 @@ def compute_sig_implicit_deps(self):
897900
else:
898901
upd(tstamp[env.variant()][k.id])
899902

900-
return m.digest()
903+
return self.m.digest()
901904

902905
def funex(c):
903906
dc = {}
@@ -1132,7 +1135,7 @@ def extract_deps(tasks):
11321135
except: # this is on purpose
11331136
pass
11341137

1135-
variant = x.env.variant()
1138+
v = x.env.variant()
11361139
key = x.unique_id()
11371140
for k in x.generator.bld.node_deps.get(x.unique_id(), []):
11381141
try: dep_to_task[(v, k.id)].append(x)

tools/wafadmin/TaskGen.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ def exec_rule(self):
527527
raise Utils.WafError('input file %r could not be found (%r)' % (x, self.path.abspath()))
528528
tsk.inputs.append(y)
529529

530+
if self.allnodes:
531+
tsk.inputs.extend(self.allnodes)
532+
530533
if getattr(self, 'scan', None):
531534
cls.scan = self.scan
532535

0 commit comments

Comments
 (0)