2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00

accept lists in bld.add_manual_dependency

This commit is contained in:
Thomas Nagy 2012-03-24 11:37:48 +01:00
parent c86de0c041
commit 67a3320c4a

View File

@ -401,13 +401,20 @@ class BuildContext(Context.Context):
:param value: value to depend on
:type value: :py:class:`waflib.Node.Node`, string, or function returning a string
"""
if path is None:
raise ValueError('Invalid input')
if isinstance(path, waflib.Node.Node):
node = path
elif os.path.isabs(path):
node = self.root.find_resource(path)
else:
node = self.path.find_resource(path)
self.deps_man[id(node)].append(value)
if isinstance(value, list):
self.deps_man[id(node)].extend(value)
else:
self.deps_man[id(node)].append(value)
def launch_node(self):
"""Returns the launch directory as a :py:class:`waflib.Node.Node` object"""