Chromium Code Reviews| Index: pylib/gyp/input.py |
| =================================================================== |
| --- pylib/gyp/input.py (revision 915) |
| +++ pylib/gyp/input.py (working copy) |
| @@ -1042,10 +1042,14 @@ |
| similar dict. |
| """ |
| + all_dependency_sections = [dep + op |
| + for dep in dependency_sections |
| + for op in ('', '!', '/')] |
| + |
| for target, target_dict in targets.iteritems(): |
| target_build_file = gyp.common.BuildFile(target) |
| toolset = target_dict['toolset'] |
| - for dependency_key in dependency_sections: |
| + for dependency_key in all_dependency_sections: |
| dependencies = target_dict.get(dependency_key, []) |
| for index in xrange(0, len(dependencies)): |
| dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget( |
| @@ -1353,6 +1357,17 @@ |
| target_node.dependencies = [root_node] |
| root_node.dependents.append(target_node) |
| else: |
| + # Apply the list filters ('!' and '/') to dependencies list. |
| + deps_dict = {} |
| + for op in ('', '!', '/'): |
| + key = 'dependencies' + op |
| + if key in spec and len(spec[key]) > 0: |
| + deps_dict[key] = spec[key] |
| + del spec[key] # Remove the key applied. |
| + ProcessListFiltersInDict(target, deps_dict) |
| + # Write the result back to |spec|. |
| + spec['dependencies'] = deps_dict['dependencies'] |
|
Mark Mentovai
2011/05/03 18:32:35
1. I don’t want to set spec['dependencies'] at all
Yuki Shiino
2011/05/04 10:52:11
I've changed the way, but I explain what I thought
|
| + |
| dependencies = spec['dependencies'] |
| for index in xrange(0, len(dependencies)): |
| try: |
| @@ -1818,7 +1833,7 @@ |
| Regular expression (regex) filters are contained in dict keys named with a |
| trailing "/", such as "sources/" to operate on the "sources" list. Regex |
| filters in a dict take the form: |
| - 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'] ], |
| + 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'], |
| ['include', '_mac\\.cc$'] ], |
| The first filter says to exclude all files ending in _linux.cc, _mac.cc, and |
| _win.cc. The second filter then includes all files ending in _mac.cc that |