OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 gyp_file = "gn.gyp" | 5 defines = [ "GN_BUILD" ] |
6 external = true | |
7 | |
8 # Not defined when doing a GYP build, this lets the code key off of GN-specific | |
9 # features (the last change target). This can be removed when the last change | |
10 # target is supported by the GN->GYP converter (see is_gyp conditional for that | |
11 # below). | |
12 if (!is_gyp) { | |
13 defines = [ "GN_BUILD" ] | |
14 } | |
15 | 6 |
16 static_library("gn_lib") { | 7 static_library("gn_lib") { |
17 sources = [ | 8 sources = [ |
18 "action_target_generator.cc", | 9 "action_target_generator.cc", |
19 "action_target_generator.h", | 10 "action_target_generator.h", |
20 "action_values.cc", | 11 "action_values.cc", |
21 "action_values.h", | 12 "action_values.h", |
22 "args.cc", | 13 "args.cc", |
23 "args.h", | 14 "args.h", |
24 "binary_target_generator.cc", | 15 "binary_target_generator.cc", |
25 "binary_target_generator.h", | 16 "binary_target_generator.h", |
26 "build_settings.cc", | 17 "build_settings.cc", |
27 "build_settings.h", | 18 "build_settings.h", |
28 "builder.cc", | 19 "builder.cc", |
29 "builder.h", | 20 "builder.h", |
30 "builder_record.cc", | 21 "builder_record.cc", |
31 "builder_record.h", | 22 "builder_record.h", |
32 "command_args.cc", | 23 "command_args.cc", |
33 "command_desc.cc", | 24 "command_desc.cc", |
34 "command_gen.cc", | 25 "command_gen.cc", |
35 "command_gyp.cc", | |
36 "command_help.cc", | 26 "command_help.cc", |
37 "command_refs.cc", | 27 "command_refs.cc", |
38 "commands.cc", | 28 "commands.cc", |
39 "commands.h", | 29 "commands.h", |
40 "config.cc", | 30 "config.cc", |
41 "config.h", | 31 "config.h", |
42 "config_values.cc", | 32 "config_values.cc", |
43 "config_values.h", | 33 "config_values.h", |
44 "config_values_extractors.cc", | 34 "config_values_extractors.cc", |
45 "config_values_extractors.h", | 35 "config_values_extractors.h", |
(...skipping 16 matching lines...) Expand all Loading... |
62 "function_process_file_template.cc", | 52 "function_process_file_template.cc", |
63 "function_read_file.cc", | 53 "function_read_file.cc", |
64 "function_rebase_path.cc", | 54 "function_rebase_path.cc", |
65 "function_set_default_toolchain.cc", | 55 "function_set_default_toolchain.cc", |
66 "function_set_defaults.cc", | 56 "function_set_defaults.cc", |
67 "function_template.cc", | 57 "function_template.cc", |
68 "function_toolchain.cc", | 58 "function_toolchain.cc", |
69 "function_write_file.cc", | 59 "function_write_file.cc", |
70 "group_target_generator.cc", | 60 "group_target_generator.cc", |
71 "group_target_generator.h", | 61 "group_target_generator.h", |
72 "gyp_binary_target_writer.cc", | |
73 "gyp_binary_target_writer.h", | |
74 "gyp_helper.cc", | |
75 "gyp_helper.h", | |
76 "gyp_action_target_writer.cc", | |
77 "gyp_action_target_writer.h", | |
78 "gyp_target_writer.cc", | |
79 "gyp_target_writer.h", | |
80 "import_manager.cc", | 62 "import_manager.cc", |
81 "import_manager.h", | 63 "import_manager.h", |
82 "input_conversion.cc", | 64 "input_conversion.cc", |
83 "input_conversion.h", | 65 "input_conversion.h", |
84 "input_file.cc", | 66 "input_file.cc", |
85 "input_file.h", | 67 "input_file.h", |
86 "input_file_manager.cc", | 68 "input_file_manager.cc", |
87 "input_file_manager.h", | 69 "input_file_manager.h", |
88 "item.cc", | 70 "item.cc", |
89 "item.h", | 71 "item.h", |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 ] | 149 ] |
168 } | 150 } |
169 | 151 |
170 executable("gn") { | 152 executable("gn") { |
171 sources = [ | 153 sources = [ |
172 "gn_main.cc", | 154 "gn_main.cc", |
173 ] | 155 ] |
174 | 156 |
175 deps = [ | 157 deps = [ |
176 ":gn_lib", | 158 ":gn_lib", |
| 159 "//build/util:last_change", |
177 ] | 160 ] |
178 if (!is_gyp) { | |
179 # Currently this only works in GYP (see GN_BUILD above). | |
180 deps += [ "//build/util:last_change" ] | |
181 } | |
182 } | 161 } |
183 | 162 |
184 test("gn_unittests") { | 163 test("gn_unittests") { |
185 sources = [ | 164 sources = [ |
186 "builder_unittest.cc", | 165 "builder_unittest.cc", |
187 "escape_unittest.cc", | 166 "escape_unittest.cc", |
188 "filesystem_utils_unittest.cc", | 167 "filesystem_utils_unittest.cc", |
189 "file_template_unittest.cc", | 168 "file_template_unittest.cc", |
190 "function_rebase_path_unittest.cc", | 169 "function_rebase_path_unittest.cc", |
191 "gyp_action_target_writer_unittest.cc", | |
192 "gyp_binary_target_writer_unittest.cc", | |
193 "input_conversion_unittest.cc", | 170 "input_conversion_unittest.cc", |
194 "label_unittest.cc", | 171 "label_unittest.cc", |
195 "loader_unittest.cc", | 172 "loader_unittest.cc", |
196 "ninja_action_target_writer_unittest.cc", | 173 "ninja_action_target_writer_unittest.cc", |
197 "ninja_binary_target_writer_unittest.cc", | 174 "ninja_binary_target_writer_unittest.cc", |
198 "ninja_copy_target_writer_unittest.cc", | 175 "ninja_copy_target_writer_unittest.cc", |
199 "ninja_helper_unittest.cc", | 176 "ninja_helper_unittest.cc", |
200 "operators_unittest.cc", | 177 "operators_unittest.cc", |
201 "parser_unittest.cc", | 178 "parser_unittest.cc", |
202 "path_output_unittest.cc", | 179 "path_output_unittest.cc", |
(...skipping 13 matching lines...) Expand all Loading... |
216 "//base/test:run_all_unittests", | 193 "//base/test:run_all_unittests", |
217 "//base/test:test_support_base", | 194 "//base/test:test_support_base", |
218 "//testing/gtest", | 195 "//testing/gtest", |
219 ] | 196 ] |
220 } | 197 } |
221 | 198 |
222 executable("generate_test_gn_data") { | 199 executable("generate_test_gn_data") { |
223 sources = [ "generate_test_gn_data.cc" ] | 200 sources = [ "generate_test_gn_data.cc" ] |
224 deps = [ "//base" ] | 201 deps = [ "//base" ] |
225 } | 202 } |
OLD | NEW |