diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 17:52:54 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 17:52:54 +0000 |
commit | f82ef0669069492f863bdbc4bf225c95bcc662a8 (patch) | |
tree | 40c9d67a3078f1b511d8aa7f0299a92fadf1807a /tools | |
parent | 8b3f0f025452b3d5a79e7942045574f84040b3c5 (diff) | |
download | chromium_src-f82ef0669069492f863bdbc4bf225c95bcc662a8.zip chromium_src-f82ef0669069492f863bdbc4bf225c95bcc662a8.tar.gz chromium_src-f82ef0669069492f863bdbc4bf225c95bcc662a8.tar.bz2 |
Don't make checkdeps ignore includes to directories that are brought in via deps. Most of these are already listed in DEPS files, and it seems that we want to prevent includes on them just like normal directories that are in our tree (otherwise content can depend on native_client, for ex)
Review URL: https://chromiumcodereview.appspot.com/10248005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/checkdeps/checkdeps.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/tools/checkdeps/checkdeps.py b/tools/checkdeps/checkdeps.py index 02d8d14..0e98dafc 100755 --- a/tools/checkdeps/checkdeps.py +++ b/tools/checkdeps/checkdeps.py @@ -59,9 +59,6 @@ import re import sys import copy -# Variable name used in the DEPS file to specify module-level deps. -DEPS_VAR_NAME = "deps" - # Variable name used in the DEPS file to add or subtract include files from # the module-level deps. INCLUDE_RULES_VAR_NAME = "include_rules" @@ -170,12 +167,11 @@ class Rules: return (False, "no rule applying") -def ApplyRules(existing_rules, deps, includes, cur_dir): - """Applies the given deps and include rules, returning the new rules. +def ApplyRules(existing_rules, includes, cur_dir): + """Applies the given include rules, returning the new rules. Args: existing_rules: A set of existing rules that will be combined. - deps: The list of imports from the "deps" section of the DEPS file. include: The list of rules from the "include_rules" section of DEPS. cur_dir: The current directory. We will create an implicit rule that allows inclusion from this directory. @@ -199,13 +195,6 @@ def ApplyRules(existing_rules, deps, includes, cur_dir): " for\n %s and base dir\n %s" % (cur_dir, BASE_DIRECTORY)) - # Next apply the DEPS additions, these are all allowed. Note that DEPS start - # out with "src/" which we want to trim. - for (index, key) in enumerate(deps): - if key.startswith("src/"): - key = key[4:] - rules.AddRule("+" + key, relative_dir + "'s deps for " + key) - # Last, apply the additional explicit rules. for (index, rule_str) in enumerate(includes): if not len(relative_dir): @@ -275,12 +264,10 @@ def ApplyDirectoryRules(existing_rules, dir_name): # Even if a DEPS file does not exist we still invoke ApplyRules # to apply the implicit "allow" rule for the current directory - deps = local_scope.get(DEPS_VAR_NAME, {}) include_rules = local_scope.get(INCLUDE_RULES_VAR_NAME, []) skip_subdirs = local_scope.get(SKIP_SUBDIRS_VAR_NAME, []) - return (ApplyRules(existing_rules, deps, include_rules, dir_name), - skip_subdirs) + return (ApplyRules(existing_rules, include_rules, dir_name), skip_subdirs) def ShouldCheckFile(file_name): |