Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: pylib/gyp/generator/ninja.py

Issue 9298039: ninja: Support --toplevel-dir. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/toplevel-dir/gyptest-toplevel-dir.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import gyp 5 import gyp
6 import gyp.common 6 import gyp.common
7 import gyp.system_test 7 import gyp.system_test
8 import gyp.xcode_emulation 8 import gyp.xcode_emulation
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 gyp.common.ParseQualifiedTarget(qualified_target) 1120 gyp.common.ParseQualifiedTarget(qualified_target)
1121 1121
1122 this_make_global_settings = data[build_file].get('make_global_settings', []) 1122 this_make_global_settings = data[build_file].get('make_global_settings', [])
1123 assert make_global_settings == this_make_global_settings, ( 1123 assert make_global_settings == this_make_global_settings, (
1124 "make_global_settings needs to be the same for all targets.") 1124 "make_global_settings needs to be the same for all targets.")
1125 1125
1126 spec = target_dicts[qualified_target] 1126 spec = target_dicts[qualified_target]
1127 if flavor == 'mac': 1127 if flavor == 'mac':
1128 gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec) 1128 gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec)
1129 1129
1130 # TODO: what is options.depth and how is it different than 1130 build_file = gyp.common.RelativePath(build_file, options.toplevel_dir)
1131 # options.toplevel_dir?
1132 build_file = gyp.common.RelativePath(build_file, options.depth)
1133 1131
1134 base_path = os.path.dirname(build_file) 1132 base_path = os.path.dirname(build_file)
1135 obj = 'obj' 1133 obj = 'obj'
1136 if toolset != 'target': 1134 if toolset != 'target':
1137 obj += '.' + toolset 1135 obj += '.' + toolset
1138 output_file = os.path.join(obj, base_path, name + '.ninja') 1136 output_file = os.path.join(obj, base_path, name + '.ninja')
1139 1137
1140 abs_build_dir=os.path.abspath(os.path.join(options.toplevel_dir, build_dir)) 1138 abs_build_dir=os.path.abspath(os.path.join(options.toplevel_dir, build_dir))
1141 writer = NinjaWriter(target_outputs, base_path, build_dir, 1139 writer = NinjaWriter(target_outputs, base_path, build_dir,
1142 OpenOutput(os.path.join(options.toplevel_dir, 1140 OpenOutput(os.path.join(options.toplevel_dir,
(...skipping 18 matching lines...) Expand all
1161 1159
1162 user_config = params.get('generator_flags', {}).get('config', None) 1160 user_config = params.get('generator_flags', {}).get('config', None)
1163 if user_config: 1161 if user_config:
1164 GenerateOutputForConfig(target_list, target_dicts, data, params, 1162 GenerateOutputForConfig(target_list, target_dicts, data, params,
1165 user_config) 1163 user_config)
1166 else: 1164 else:
1167 config_names = target_dicts[target_list[0]]['configurations'].keys() 1165 config_names = target_dicts[target_list[0]]['configurations'].keys()
1168 for config_name in config_names: 1166 for config_name in config_names:
1169 GenerateOutputForConfig(target_list, target_dicts, data, params, 1167 GenerateOutputForConfig(target_list, target_dicts, data, params,
1170 config_name) 1168 config_name)
OLDNEW
« no previous file with comments | « no previous file | test/toplevel-dir/gyptest-toplevel-dir.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698