Commit d36352ca authored by bradnelson@google.com's avatar bradnelson@google.com

Allow checkdeps to function in the presence of File().

This will allow a verbatim migration of the nacl sdk into chrome.

BUG=None
TEST=None
R=noelallen@google.com
Review URL: http://codereview.chromium.org/8609003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110870 0039d316-1c4b-4281-b951-d872f2087c98
parent fd92f703
......@@ -246,6 +246,9 @@ def ApplyDirectoryRules(existing_rules, dir_name):
def FromImpl(unused, unused2):
pass # NOP function so "From" doesn't fail.
def FileImpl(unused):
pass # NOP function so "File" doesn't fail.
class _VarImpl:
def __init__(self, local_scope):
self._local_scope = local_scope
......@@ -257,7 +260,11 @@ def ApplyDirectoryRules(existing_rules, dir_name):
raise Error("Var is not defined: %s" % var_name)
local_scope = {}
global_scope = {"From": FromImpl, "Var": _VarImpl(local_scope).Lookup}
global_scope = {
"File": FileImpl,
"From": FromImpl,
"Var": _VarImpl(local_scope).Lookup,
}
deps_file = os.path.join(dir_name, "DEPS")
if os.path.isfile(deps_file):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment