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

Side by Side Diff: build/config/mac/rules.gni

Issue 2453933006: Revert of [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « build/config/mac/prepare_framework_version.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. 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("//build/config/mac/base_rules.gni") 5 import("//build/config/mac/base_rules.gni")
6 6
7 # Generates Info.plist files for Mac apps and frameworks. 7 # Generates Info.plist files for Mac apps and frameworks.
8 # 8 #
9 # Arguments 9 # Arguments
10 # 10 #
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (defined(invoker.output_name)) { 251 if (defined(invoker.output_name)) {
252 _output_name = invoker.output_name 252 _output_name = invoker.output_name
253 } 253 }
254 254
255 # If the framework is unversioned, the final _target_name will be the 255 # If the framework is unversioned, the final _target_name will be the
256 # create_bundle(_framework_target), otherwise an action with the name 256 # create_bundle(_framework_target), otherwise an action with the name
257 # _target_name will depends on the the create_bundle() in order to prepare 257 # _target_name will depends on the the create_bundle() in order to prepare
258 # the versioned directory structure. 258 # the versioned directory structure.
259 _framework_target = _target_name 259 _framework_target = _target_name
260 _framework_name = _output_name + ".framework" 260 _framework_name = _output_name + ".framework"
261 _framework_base_dir = "$root_out_dir/$_framework_name" 261 _framework_root_dir = "$root_out_dir/$_framework_name"
262 if (defined(invoker.framework_version) && invoker.framework_version != "") { 262 if (defined(invoker.framework_version) && invoker.framework_version != "") {
263 _framework_version = invoker.framework_version 263 _framework_version = invoker.framework_version
264 _framework_root_dir = _framework_base_dir + "/Versions/$_framework_version" 264 _framework_root_dir += "/Versions/$_framework_version"
265 _framework_target = _target_name + "_create_bundle" 265 _framework_target = _target_name + "_create_bundle"
266 } else {
267 _framework_root_dir = _framework_base_dir
268 } 266 }
269 267
270 _link_shared_library_target = target_name + "_shared_library" 268 _link_shared_library_target = target_name + "_shared_library"
271 _shared_library_bundle_data = target_name + "_shared_library_bundle_data" 269 _shared_library_bundle_data = target_name + "_shared_library_bundle_data"
272 270
273 shared_library(_link_shared_library_target) { 271 shared_library(_link_shared_library_target) {
274 forward_variables_from(invoker, 272 forward_variables_from(invoker,
275 "*", 273 "*",
276 [ 274 [
277 "assert_no_deps", 275 "assert_no_deps",
(...skipping 19 matching lines...) Expand all
297 "$target_out_dir/$_link_shared_library_target/$_output_name", 295 "$target_out_dir/$_link_shared_library_target/$_output_name",
298 ] 296 ]
299 outputs = [ 297 outputs = [
300 "{{bundle_executable_dir}}/$_output_name", 298 "{{bundle_executable_dir}}/$_output_name",
301 ] 299 ]
302 public_deps = [ 300 public_deps = [
303 ":$_link_shared_library_target", 301 ":$_link_shared_library_target",
304 ] 302 ]
305 } 303 }
306 304
307 # Clean the entire framework if the framework_version changes.
308 _version_arg = ""
309 if (defined(_framework_version)) {
310 _version_arg = _framework_version
311 }
312 _version_file = "$target_out_dir/${target_name}_version"
313 exec_script("//build/config/mac/prepare_framework_version.py",
314 [
315 rebase_path(_version_file),
316 rebase_path(_framework_base_dir),
317 "'$_version_arg'",
318 ])
319
320 _framework_public_config = _target_name + "_public_config" 305 _framework_public_config = _target_name + "_public_config"
321 config(_framework_public_config) { 306 config(_framework_public_config) {
322 # TODO(sdefresne): should we have a framework_dirs similar to lib_dirs 307 # TODO(sdefresne): should we have a framework_dirs similar to lib_dirs
323 # and include_dirs to avoid duplicate values on the command-line. 308 # and include_dirs to avoid duplicate values on the command-line.
324 visibility = [ ":$_framework_target" ] 309 visibility = [ ":$_framework_target" ]
325 ldflags = [ 310 ldflags = [
326 "-F", 311 "-F",
327 rebase_path("$root_out_dir/.", root_build_dir), 312 rebase_path("$root_out_dir/.", root_build_dir),
328 ] 313 ]
329 lib_dirs = [ root_out_dir ] 314 lib_dirs = [ root_out_dir ]
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 ]) 632 ])
648 if (!defined(deps)) { 633 if (!defined(deps)) {
649 deps = [] 634 deps = []
650 } 635 }
651 deps += [ ":$_loadable_module_bundle_data" ] 636 deps += [ ":$_loadable_module_bundle_data" ]
652 637
653 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" 638 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents"
654 bundle_executable_dir = "$bundle_root_dir/MacOS" 639 bundle_executable_dir = "$bundle_root_dir/MacOS"
655 } 640 }
656 } 641 }
OLDNEW
« no previous file with comments | « build/config/mac/prepare_framework_version.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698