[email protected] | e3730f81 | 2013-10-16 16:46:14 | [diff] [blame] | 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 |
| 3 | # found in the LICENSE file. |
| 4 | |
[email protected] | 1539320 | 2014-03-27 21:08:35 | [diff] [blame] | 5 | defines = [ "GN_BUILD" ] |
[email protected] | 9af0b83 | 2013-11-08 20:31:13 | [diff] [blame] | 6 | |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 7 | static_library("gn_lib") { |
| 8 | sources = [ |
[email protected] | 2fbe101 | 2014-03-20 17:59:15 | [diff] [blame] | 9 | "action_target_generator.cc", |
| 10 | "action_target_generator.h", |
| 11 | "action_values.cc", |
| 12 | "action_values.h", |
[email protected] | 60749e1c | 2013-08-19 21:11:05 | [diff] [blame] | 13 | "args.cc", |
| 14 | "args.h", |
[email protected] | c0822d7f | 2013-08-13 17:10:56 | [diff] [blame] | 15 | "binary_target_generator.cc", |
| 16 | "binary_target_generator.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 17 | "build_settings.cc", |
| 18 | "build_settings.h", |
[email protected] | 26542b0 | 2013-11-08 23:25:04 | [diff] [blame] | 19 | "builder.cc", |
| 20 | "builder.h", |
| 21 | "builder_record.cc", |
| 22 | "builder_record.h", |
[email protected] | 126d8b5 | 2014-04-07 22:17:35 | [diff] [blame] | 23 | "c_include_iterator.cc", |
| 24 | "c_include_iterator.h", |
[email protected] | 60749e1c | 2013-08-19 21:11:05 | [diff] [blame] | 25 | "command_args.cc", |
[email protected] | 126d8b5 | 2014-04-07 22:17:35 | [diff] [blame] | 26 | "command_check.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 27 | "command_desc.cc", |
| 28 | "command_gen.cc", |
scottmg | 2dd93e8b | 2014-09-26 04:07:05 | [diff] [blame] | 29 | "command_format.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 30 | "command_help.cc", |
brettw | 3741b72 | 2014-08-29 17:07:20 | [diff] [blame] | 31 | "command_ls.cc", |
[email protected] | 60749e1c | 2013-08-19 21:11:05 | [diff] [blame] | 32 | "command_refs.cc", |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 33 | "commands.cc", |
| 34 | "commands.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 35 | "config.cc", |
| 36 | "config.h", |
[email protected] | 93c19fd2 | 2013-08-06 19:34:44 | [diff] [blame] | 37 | "config_values.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 38 | "config_values.h", |
| 39 | "config_values_extractors.cc", |
| 40 | "config_values_extractors.h", |
| 41 | "config_values_generator.cc", |
| 42 | "config_values_generator.h", |
[email protected] | c0822d7f | 2013-08-13 17:10:56 | [diff] [blame] | 43 | "copy_target_generator.cc", |
| 44 | "copy_target_generator.h", |
brettw | c2e821a3 | 2014-09-17 01:07:14 | [diff] [blame] | 45 | "deps_iterator.cc", |
| 46 | "deps_iterator.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 47 | "err.cc", |
| 48 | "err.h", |
| 49 | "escape.cc", |
| 50 | "escape.h", |
cjhopman | 5579301 | 2014-10-16 19:19:40 | [diff] [blame^] | 51 | "exec_process.cc", |
| 52 | "exec_process.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 53 | "filesystem_utils.cc", |
| 54 | "filesystem_utils.h", |
| 55 | "functions.cc", |
| 56 | "functions.h", |
| 57 | "functions_target.cc", |
| 58 | "function_exec_script.cc", |
[email protected] | 92cafe5 | 2014-05-13 19:42:25 | [diff] [blame] | 59 | "function_foreach.cc", |
[email protected] | 7380ca7 | 2014-05-13 16:56:20 | [diff] [blame] | 60 | "function_get_label_info.cc", |
[email protected] | 01bd79b | 2014-06-05 17:36:25 | [diff] [blame] | 61 | "function_get_path_info.cc", |
[email protected] | e1bd79f | 2014-05-05 20:27:53 | [diff] [blame] | 62 | "function_get_target_outputs.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 63 | "function_process_file_template.cc", |
| 64 | "function_read_file.cc", |
[email protected] | ea3690c | 2013-09-23 17:59:22 | [diff] [blame] | 65 | "function_rebase_path.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 66 | "function_set_default_toolchain.cc", |
[email protected] | 6b4ee78 | 2013-08-20 17:13:24 | [diff] [blame] | 67 | "function_set_defaults.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 68 | "function_template.cc", |
| 69 | "function_toolchain.cc", |
| 70 | "function_write_file.cc", |
[email protected] | c0822d7f | 2013-08-13 17:10:56 | [diff] [blame] | 71 | "group_target_generator.cc", |
| 72 | "group_target_generator.h", |
[email protected] | 126d8b5 | 2014-04-07 22:17:35 | [diff] [blame] | 73 | "header_checker.cc", |
| 74 | "header_checker.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 75 | "import_manager.cc", |
| 76 | "import_manager.h", |
| 77 | "input_conversion.cc", |
| 78 | "input_conversion.h", |
| 79 | "input_file.cc", |
| 80 | "input_file.h", |
| 81 | "input_file_manager.cc", |
| 82 | "input_file_manager.h", |
| 83 | "item.cc", |
| 84 | "item.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 85 | "label.cc", |
| 86 | "label.h", |
brettw | 3741b72 | 2014-08-29 17:07:20 | [diff] [blame] | 87 | "label_pattern.cc", |
| 88 | "label_pattern.h", |
[email protected] | 68d1dd3 | 2013-11-01 21:59:51 | [diff] [blame] | 89 | "label_ptr.h", |
[email protected] | 26542b0 | 2013-11-08 23:25:04 | [diff] [blame] | 90 | "loader.cc", |
| 91 | "loader.h", |
[email protected] | b0d3ad5d | 2013-09-16 23:31:36 | [diff] [blame] | 92 | "location.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 93 | "location.h", |
[email protected] | 2fbe101 | 2014-03-20 17:59:15 | [diff] [blame] | 94 | "ninja_action_target_writer.cc", |
| 95 | "ninja_action_target_writer.h", |
[email protected] | c0822d7f | 2013-08-13 17:10:56 | [diff] [blame] | 96 | "ninja_binary_target_writer.cc", |
| 97 | "ninja_binary_target_writer.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 98 | "ninja_build_writer.cc", |
| 99 | "ninja_build_writer.h", |
[email protected] | c0822d7f | 2013-08-13 17:10:56 | [diff] [blame] | 100 | "ninja_copy_target_writer.cc", |
| 101 | "ninja_copy_target_writer.h", |
| 102 | "ninja_group_target_writer.cc", |
| 103 | "ninja_group_target_writer.h", |
[email protected] | 0dfcae7 | 2014-08-19 22:52:16 | [diff] [blame] | 104 | "ninja_utils.cc", |
| 105 | "ninja_utils.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 106 | "ninja_target_writer.cc", |
| 107 | "ninja_target_writer.h", |
| 108 | "ninja_toolchain_writer.cc", |
| 109 | "ninja_toolchain_writer.h", |
| 110 | "ninja_writer.cc", |
| 111 | "ninja_writer.h", |
| 112 | "operators.cc", |
| 113 | "operators.h", |
[email protected] | 0dfcae7 | 2014-08-19 22:52:16 | [diff] [blame] | 114 | "output_file.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 115 | "output_file.h", |
| 116 | "parse_tree.cc", |
| 117 | "parse_tree.h", |
| 118 | "parser.cc", |
| 119 | "parser.h", |
| 120 | "path_output.cc", |
| 121 | "path_output.h", |
| 122 | "pattern.cc", |
| 123 | "pattern.h", |
| 124 | "scheduler.cc", |
| 125 | "scheduler.h", |
| 126 | "scope.cc", |
| 127 | "scope.h", |
| 128 | "scope_per_file_provider.cc", |
| 129 | "scope_per_file_provider.h", |
| 130 | "settings.cc", |
| 131 | "settings.h", |
| 132 | "setup.cc", |
| 133 | "setup.h", |
| 134 | "source_dir.cc", |
| 135 | "source_dir.h", |
| 136 | "source_file.cc", |
| 137 | "source_file.h", |
[email protected] | 0dfcae7 | 2014-08-19 22:52:16 | [diff] [blame] | 138 | "source_file_type.cc", |
| 139 | "source_file_type.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 140 | "standard_out.cc", |
| 141 | "standard_out.h", |
| 142 | "string_utils.cc", |
| 143 | "string_utils.h", |
[email protected] | 012db594 | 2014-08-06 20:38:45 | [diff] [blame] | 144 | "substitution_list.cc", |
| 145 | "substitution_list.h", |
| 146 | "substitution_pattern.cc", |
| 147 | "substitution_pattern.h", |
| 148 | "substitution_type.cc", |
| 149 | "substitution_type.h", |
| 150 | "substitution_writer.cc", |
| 151 | "substitution_writer.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 152 | "target.cc", |
| 153 | "target.h", |
| 154 | "target_generator.cc", |
| 155 | "target_generator.h", |
[email protected] | a4e86292 | 2014-03-27 21:16:22 | [diff] [blame] | 156 | "template.cc", |
| 157 | "template.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 158 | "token.cc", |
| 159 | "token.h", |
| 160 | "tokenizer.cc", |
[email protected] | 0dfcae7 | 2014-08-19 22:52:16 | [diff] [blame] | 161 | "tool.cc", |
| 162 | "tool.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 163 | "tokenizer.h", |
| 164 | "toolchain.cc", |
| 165 | "toolchain.h", |
[email protected] | 7f8c9fc | 2013-09-23 18:08:28 | [diff] [blame] | 166 | "trace.cc", |
| 167 | "trace.h", |
[email protected] | 8fc5618 | 2014-08-06 21:44:33 | [diff] [blame] | 168 | "unique_vector.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 169 | "value.cc", |
| 170 | "value.h", |
| 171 | "value_extractors.cc", |
| 172 | "value_extractors.h", |
[email protected] | 4441041b | 2013-08-06 21:11:06 | [diff] [blame] | 173 | "variables.cc", |
| 174 | "variables.h", |
[email protected] | 60c9d17 | 2014-04-01 21:45:11 | [diff] [blame] | 175 | "visibility.cc", |
| 176 | "visibility.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 177 | ] |
[email protected] | 9af0b83 | 2013-11-08 20:31:13 | [diff] [blame] | 178 | |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 179 | deps = [ |
| 180 | "//base", |
| 181 | "//base/third_party/dynamic_annotations", |
| 182 | ] |
| 183 | } |
| 184 | |
Brett Wilson | 48c29f2 | 2014-08-25 19:06:58 | [diff] [blame] | 185 | action("last_commit_position") { |
| 186 | script = "last_commit_position.py" |
| 187 | |
| 188 | # This dependency forces a re-run when the code is synced. |
| 189 | inputs = [ "//build/util/LASTCHANGE" ] |
| 190 | |
| 191 | outfile = "$target_gen_dir/last_commit_position.h" |
| 192 | outputs = [ outfile ] |
| 193 | |
| 194 | args = [ |
| 195 | rebase_path("//", root_build_dir), |
| 196 | rebase_path(outfile, root_build_dir), |
| 197 | "TOOLS_GN_LAST_COMMIT_POSITION_H_", |
| 198 | ] |
| 199 | } |
| 200 | |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 201 | executable("gn") { |
| 202 | sources = [ |
| 203 | "gn_main.cc", |
| 204 | ] |
[email protected] | 9af0b83 | 2013-11-08 20:31:13 | [diff] [blame] | 205 | |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 206 | deps = [ |
| 207 | ":gn_lib", |
Brett Wilson | 48c29f2 | 2014-08-25 19:06:58 | [diff] [blame] | 208 | ":last_commit_position", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 209 | ] |
| 210 | } |
| 211 | |
| 212 | test("gn_unittests") { |
| 213 | sources = [ |
[email protected] | 012db594 | 2014-08-06 20:38:45 | [diff] [blame] | 214 | "action_target_generator_unittest.cc", |
[email protected] | 26542b0 | 2013-11-08 23:25:04 | [diff] [blame] | 215 | "builder_unittest.cc", |
[email protected] | 126d8b5 | 2014-04-07 22:17:35 | [diff] [blame] | 216 | "c_include_iterator_unittest.cc", |
scottmg | 2dd93e8b | 2014-09-26 04:07:05 | [diff] [blame] | 217 | "command_format_unittest.cc", |
[email protected] | 58d2a90 | 2014-04-15 22:15:36 | [diff] [blame] | 218 | "config_values_extractors_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 219 | "escape_unittest.cc", |
cjhopman | 5579301 | 2014-10-16 19:19:40 | [diff] [blame^] | 220 | "exec_process_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 221 | "filesystem_utils_unittest.cc", |
[email protected] | 92cafe5 | 2014-05-13 19:42:25 | [diff] [blame] | 222 | "function_foreach_unittest.cc", |
[email protected] | 7380ca7 | 2014-05-13 16:56:20 | [diff] [blame] | 223 | "function_get_label_info_unittest.cc", |
[email protected] | 01bd79b | 2014-06-05 17:36:25 | [diff] [blame] | 224 | "function_get_path_info_unittest.cc", |
[email protected] | e1bd79f | 2014-05-05 20:27:53 | [diff] [blame] | 225 | "function_get_target_outputs_unittest.cc", |
[email protected] | 209d521c | 2014-08-12 23:29:06 | [diff] [blame] | 226 | "function_process_file_template_unittest.cc", |
[email protected] | ea3690c | 2013-09-23 17:59:22 | [diff] [blame] | 227 | "function_rebase_path_unittest.cc", |
[email protected] | fd54675 | 2014-05-30 16:24:33 | [diff] [blame] | 228 | "function_write_file_unittest.cc", |
[email protected] | 3ffa36a | 2014-07-24 21:01:50 | [diff] [blame] | 229 | "functions_target_unittest.cc", |
[email protected] | a4e86292 | 2014-03-27 21:16:22 | [diff] [blame] | 230 | "functions_unittest.cc", |
[email protected] | 126d8b5 | 2014-04-07 22:17:35 | [diff] [blame] | 231 | "header_checker_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 232 | "input_conversion_unittest.cc", |
brettw | 3741b72 | 2014-08-29 17:07:20 | [diff] [blame] | 233 | "label_pattern_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 234 | "label_unittest.cc", |
[email protected] | 26542b0 | 2013-11-08 23:25:04 | [diff] [blame] | 235 | "loader_unittest.cc", |
[email protected] | 2fbe101 | 2014-03-20 17:59:15 | [diff] [blame] | 236 | "ninja_action_target_writer_unittest.cc", |
[email protected] | 7ff2f5d | 2013-10-08 21:30:34 | [diff] [blame] | 237 | "ninja_binary_target_writer_unittest.cc", |
[email protected] | b90c75a | 2013-09-18 22:02:50 | [diff] [blame] | 238 | "ninja_copy_target_writer_unittest.cc", |
cjhopman | 1b668a2e9 | 2014-09-09 16:30:40 | [diff] [blame] | 239 | "ninja_group_target_writer_unittest.cc", |
[email protected] | ef348fe | 2014-05-01 18:31:31 | [diff] [blame] | 240 | "ninja_target_writer_unittest.cc", |
[email protected] | 0dfcae7 | 2014-08-19 22:52:16 | [diff] [blame] | 241 | "ninja_toolchain_writer_unittest.cc", |
[email protected] | 4419688 | 2013-12-21 05:31:11 | [diff] [blame] | 242 | "operators_unittest.cc", |
[email protected] | 51d0172 | 2014-03-26 16:57:07 | [diff] [blame] | 243 | "parse_tree_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 244 | "parser_unittest.cc", |
| 245 | "path_output_unittest.cc", |
| 246 | "pattern_unittest.cc", |
[email protected] | 98756e2 | 2014-06-04 16:57:40 | [diff] [blame] | 247 | "run_all_unittests.cc", |
[email protected] | 17f43bf | 2013-08-23 21:04:46 | [diff] [blame] | 248 | "scope_per_file_provider_unittest.cc", |
[email protected] | a2d0b7a | 2013-12-16 23:59:09 | [diff] [blame] | 249 | "scope_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 250 | "source_dir_unittest.cc", |
| 251 | "string_utils_unittest.cc", |
[email protected] | 012db594 | 2014-08-06 20:38:45 | [diff] [blame] | 252 | "substitution_pattern_unittest.cc", |
| 253 | "substitution_writer_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 254 | "target_generator_unittest.cc", |
[email protected] | 3c1274d | 2013-09-10 22:21:21 | [diff] [blame] | 255 | "target_unittest.cc", |
[email protected] | 1e3fbf7b | 2014-04-08 19:15:20 | [diff] [blame] | 256 | "template_unittest.cc", |
[email protected] | 43bf6a5 | 2013-09-17 16:54:24 | [diff] [blame] | 257 | "test_with_scope.cc", |
| 258 | "test_with_scope.h", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 259 | "tokenizer_unittest.cc", |
[email protected] | 8fc5618 | 2014-08-06 21:44:33 | [diff] [blame] | 260 | "unique_vector_unittest.cc", |
[email protected] | d5645f1 | 2014-05-03 04:32:19 | [diff] [blame] | 261 | "value_unittest.cc", |
[email protected] | 60c9d17 | 2014-04-01 21:45:11 | [diff] [blame] | 262 | "visibility_unittest.cc", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 263 | ] |
| 264 | deps = [ |
| 265 | ":gn_lib", |
[email protected] | cc7ec69 | 2014-04-08 17:20:38 | [diff] [blame] | 266 | "//base/test:test_support", |
[email protected] | 23e197d | 2013-12-31 12:14:01 | [diff] [blame] | 267 | "//testing/gtest", |
[email protected] | ceb1841 | 2013-07-31 19:17:58 | [diff] [blame] | 268 | ] |
| 269 | } |
| 270 | |
| 271 | executable("generate_test_gn_data") { |
| 272 | sources = [ "generate_test_gn_data.cc" ] |
| 273 | deps = [ "//base" ] |
| 274 | } |