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

Side by Side Diff: sdk/lib/rules.gni

Issue 2454703004: GN: Format more gn files (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/toolchain/gcc_toolchain.gni ('k') | utils/create_timestamp.gni » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 default_dart_root = rebase_path("../..") 5 default_dart_root = rebase_path("../..")
6 6
7 # This build rule will copy the source for one Dart SDK library. 7 # This build rule will copy the source for one Dart SDK library.
8 # 8 #
9 # Required arguments: 9 # Required arguments:
10 # sdk_lib_name 10 # sdk_lib_name
(...skipping 13 matching lines...) Expand all
24 if (defined(invoker.dart_root)) { 24 if (defined(invoker.dart_root)) {
25 dart_root = rebase_path(invoker.dart_root) 25 dart_root = rebase_path(invoker.dart_root)
26 } else { 26 } else {
27 dart_root = default_dart_root 27 dart_root = default_dart_root
28 } 28 }
29 if (defined(invoker.destination)) { 29 if (defined(invoker.destination)) {
30 destination = invoker.destination 30 destination = invoker.destination
31 } else { 31 } else {
32 destination = "$root_gen_dir/dart_sdk" 32 destination = "$root_gen_dir/dart_sdk"
33 } 33 }
34 dart_sdk_sdk_lib_path = 34 dart_sdk_sdk_lib_path = rebase_path("sdk/lib", "", dart_root)
35 rebase_path("sdk/lib", "", dart_root)
36 dart_sdk_tools_gypi_to_gn_path = 35 dart_sdk_tools_gypi_to_gn_path =
37 rebase_path("tools/gypi_to_gn.py", "", dart_root) 36 rebase_path("tools/gypi_to_gn.py", "", dart_root)
37
38 # The name of the SDK library being copied. 38 # The name of the SDK library being copied.
39 lib_name = invoker.sdk_lib_name 39 lib_name = invoker.sdk_lib_name
40
40 # The path to the libraries source directory. 41 # The path to the libraries source directory.
41 lib_path = rebase_path(lib_name, "", dart_sdk_sdk_lib_path) 42 lib_path = rebase_path(lib_name, "", dart_sdk_sdk_lib_path)
43
42 # The path to the sources gypi. 44 # The path to the sources gypi.
43 lib_sources_gypi = lib_name + "_sources.gypi" 45 lib_sources_gypi = lib_name + "_sources.gypi"
46
44 # Get the contents of the gypi file. 47 # Get the contents of the gypi file.
45 sdk_lib_sources_gypi = 48 sdk_lib_sources_gypi =
46 exec_script(dart_sdk_tools_gypi_to_gn_path, 49 exec_script(dart_sdk_tools_gypi_to_gn_path,
47 [rebase_path(lib_sources_gypi, "", lib_path)], 50 [ rebase_path(lib_sources_gypi, "", lib_path) ],
48 "scope", 51 "scope",
49 [rebase_path(lib_sources_gypi, "", lib_path)]) 52 [ rebase_path(lib_sources_gypi, "", lib_path) ])
50 copy(target_name) { 53 copy(target_name) {
51 sources = rebase_path(sdk_lib_sources_gypi.sources, "", lib_path) 54 sources = rebase_path(sdk_lib_sources_gypi.sources, "", lib_path)
52 outputs = [ "$destination/$lib_name/{{source_file_part}}" ] 55 outputs = [
56 "$destination/$lib_name/{{source_file_part}}",
57 ]
53 } 58 }
54 } 59 }
OLDNEW
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | utils/create_timestamp.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698