Improve linking API.
Improve linking API.
1.1 --- a/ambuild2/database.py Fri Nov 15 19:11:42 2013 -0800
1.2 +++ b/ambuild2/database.py Fri Nov 15 19:48:34 2013 -0800
1.3 @@ -409,6 +409,7 @@
1.4 'Could not unmark file as dirty; leaving dirty.',
1.5 util.ConsoleNormal
1.6 )
1.7 + return
1.8
1.9 self.cn.execute(query, (stamp, entry.id))
1.10 entry.dirty = False
2.1 --- a/ambuild2/frontend/amb2/gen.py Fri Nov 15 19:11:42 2013 -0800
2.2 +++ b/ambuild2/frontend/amb2/gen.py Fri Nov 15 19:48:34 2013 -0800
2.3 @@ -437,12 +437,12 @@
2.4 def parseCxxDeps(self, context, binary, inputs, items):
2.5 for val in items:
2.6 if util.IsString(val):
2.7 - if os.path.isabs(val):
2.8 - inputs.append(val)
2.9 continue
2.10
2.11 if util.IsLambda(val.node):
2.12 item = val.node(context, binary)
2.13 + elif val.node is None:
2.14 + item = val.text
2.15 else:
2.16 item = val.node
2.17
3.1 --- a/ambuild2/frontend/cpp.py Fri Nov 15 19:11:42 2013 -0800
3.2 +++ b/ambuild2/frontend/cpp.py Fri Nov 15 19:48:34 2013 -0800
3.3 @@ -255,8 +255,12 @@
3.4 def Library(self, name):
3.5 return Library(self, name)
3.6
3.7 + @staticmethod
3.8 + def Dep(text, node=None):
3.9 + return Dep(text, node)
3.10 +
3.11 class Dep(object):
3.12 - def __init__(self, text, node):
3.13 + def __init__(self, text, node=None):
3.14 self.text = text
3.15 self.node = node
3.16
3.17 @@ -319,7 +323,7 @@
3.18
3.19 # Make an item that can be passed into linkflags/postlink but has an attached
3.20 # dependency.
3.21 - def Dep(self, text, node):
3.22 + def Dep(self, text, node=None):
3.23 return Dep(text, node)
3.24
3.25 # The folder we'll be in, relative to our build context.