| Index: tools/vim/ninja_output.py
|
| diff --git a/tools/vim/ninja_output.py b/tools/vim/ninja_output.py
|
| index 5bb638ab6d96676c368d8e5afcc81e4f7ceba308..e6add1302c8c0b6938d09deef9aee73e224f4832 100644
|
| --- a/tools/vim/ninja_output.py
|
| +++ b/tools/vim/ninja_output.py
|
| @@ -10,8 +10,8 @@ import itertools
|
| import re
|
|
|
|
|
| -def GetNinjaOutputDirectory(chrome_root, configuration=None):
|
| - """Returns <chrome_root>/<output_dir>/(Release|Debug).
|
| +def GetNinjaOutputDirectory(chrome_root):
|
| + """Returns <chrome_root>/<output_dir>/(Release|Debug|<other>).
|
|
|
| If either of the following environment variables are set, their
|
| value is used to determine the output directory:
|
| @@ -20,11 +20,7 @@ def GetNinjaOutputDirectory(chrome_root, configuration=None):
|
|
|
| Otherwise, all directories starting with the word out are examined.
|
|
|
| - The output directory must contain {configuration}/build.ninja (if
|
| - configuration is None, both Debug and Release will be checked).
|
| -
|
| - The configuration chosen is the one most recently generated/built,
|
| - but can be overriden via the <configuration> parameter.
|
| + The configuration chosen is the one most recently generated/built.
|
| """
|
|
|
| output_dirs = []
|
| @@ -45,15 +41,13 @@ def GetNinjaOutputDirectory(chrome_root, configuration=None):
|
| if os.path.isdir(out):
|
| output_dirs.append(os.path.relpath(out, start = chrome_root))
|
|
|
| - configs = ['Debug', 'Release', 'Default']
|
| - if configuration:
|
| - configs = [configuration]
|
| -
|
| def generate_paths():
|
| - for out_dir, config in itertools.product(output_dirs, configs):
|
| - path = os.path.join(chrome_root, out_dir, config)
|
| - if os.path.exists(os.path.join(path, 'build.ninja')):
|
| - yield path
|
| + for out_dir in output_dirs:
|
| + out_path = os.path.join(chrome_root, out_dir)
|
| + for config in os.listdir(out_path):
|
| + path = os.path.join(out_path, config)
|
| + if os.path.exists(os.path.join(path, 'build.ninja')):
|
| + yield path
|
|
|
| def approx_directory_mtime(path):
|
| # This is a heuristic; don't recurse into subdirectories.
|
|
|