blob: a849b47658677ef3d203a8626fdf42bf04587a47 [file] [log] [blame]
[email protected]e3730f812013-10-16 16:46:141# 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]15393202014-03-27 21:08:355defines = [ "GN_BUILD" ]
[email protected]9af0b832013-11-08 20:31:136
[email protected]ceb18412013-07-31 19:17:587static_library("gn_lib") {
8 sources = [
[email protected]2fbe1012014-03-20 17:59:159 "action_target_generator.cc",
10 "action_target_generator.h",
11 "action_values.cc",
12 "action_values.h",
[email protected]60749e1c2013-08-19 21:11:0513 "args.cc",
14 "args.h",
[email protected]c0822d7f2013-08-13 17:10:5615 "binary_target_generator.cc",
16 "binary_target_generator.h",
[email protected]ceb18412013-07-31 19:17:5817 "build_settings.cc",
18 "build_settings.h",
[email protected]26542b02013-11-08 23:25:0419 "builder.cc",
20 "builder.h",
21 "builder_record.cc",
22 "builder_record.h",
[email protected]126d8b52014-04-07 22:17:3523 "c_include_iterator.cc",
24 "c_include_iterator.h",
[email protected]60749e1c2013-08-19 21:11:0525 "command_args.cc",
[email protected]126d8b52014-04-07 22:17:3526 "command_check.cc",
[email protected]ceb18412013-07-31 19:17:5827 "command_desc.cc",
28 "command_gen.cc",
scottmg2dd93e8b2014-09-26 04:07:0529 "command_format.cc",
[email protected]ceb18412013-07-31 19:17:5830 "command_help.cc",
brettw3741b722014-08-29 17:07:2031 "command_ls.cc",
[email protected]60749e1c2013-08-19 21:11:0532 "command_refs.cc",
[email protected]93c19fd22013-08-06 19:34:4433 "commands.cc",
34 "commands.h",
[email protected]ceb18412013-07-31 19:17:5835 "config.cc",
36 "config.h",
[email protected]93c19fd22013-08-06 19:34:4437 "config_values.cc",
[email protected]ceb18412013-07-31 19:17:5838 "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]c0822d7f2013-08-13 17:10:5643 "copy_target_generator.cc",
44 "copy_target_generator.h",
brettwc2e821a32014-09-17 01:07:1445 "deps_iterator.cc",
46 "deps_iterator.h",
[email protected]ceb18412013-07-31 19:17:5847 "err.cc",
48 "err.h",
49 "escape.cc",
50 "escape.h",
[email protected]ceb18412013-07-31 19:17:5851 "filesystem_utils.cc",
52 "filesystem_utils.h",
53 "functions.cc",
54 "functions.h",
55 "functions_target.cc",
56 "function_exec_script.cc",
[email protected]92cafe52014-05-13 19:42:2557 "function_foreach.cc",
[email protected]7380ca72014-05-13 16:56:2058 "function_get_label_info.cc",
[email protected]01bd79b2014-06-05 17:36:2559 "function_get_path_info.cc",
[email protected]e1bd79f2014-05-05 20:27:5360 "function_get_target_outputs.cc",
[email protected]ceb18412013-07-31 19:17:5861 "function_process_file_template.cc",
62 "function_read_file.cc",
[email protected]ea3690c2013-09-23 17:59:2263 "function_rebase_path.cc",
[email protected]ceb18412013-07-31 19:17:5864 "function_set_default_toolchain.cc",
[email protected]6b4ee782013-08-20 17:13:2465 "function_set_defaults.cc",
[email protected]ceb18412013-07-31 19:17:5866 "function_template.cc",
67 "function_toolchain.cc",
68 "function_write_file.cc",
[email protected]c0822d7f2013-08-13 17:10:5669 "group_target_generator.cc",
70 "group_target_generator.h",
[email protected]126d8b52014-04-07 22:17:3571 "header_checker.cc",
72 "header_checker.h",
[email protected]ceb18412013-07-31 19:17:5873 "import_manager.cc",
74 "import_manager.h",
75 "input_conversion.cc",
76 "input_conversion.h",
77 "input_file.cc",
78 "input_file.h",
79 "input_file_manager.cc",
80 "input_file_manager.h",
81 "item.cc",
82 "item.h",
[email protected]ceb18412013-07-31 19:17:5883 "label.cc",
84 "label.h",
brettw3741b722014-08-29 17:07:2085 "label_pattern.cc",
86 "label_pattern.h",
[email protected]68d1dd32013-11-01 21:59:5187 "label_ptr.h",
[email protected]26542b02013-11-08 23:25:0488 "loader.cc",
89 "loader.h",
[email protected]b0d3ad5d2013-09-16 23:31:3690 "location.cc",
[email protected]ceb18412013-07-31 19:17:5891 "location.h",
[email protected]2fbe1012014-03-20 17:59:1592 "ninja_action_target_writer.cc",
93 "ninja_action_target_writer.h",
[email protected]c0822d7f2013-08-13 17:10:5694 "ninja_binary_target_writer.cc",
95 "ninja_binary_target_writer.h",
[email protected]ceb18412013-07-31 19:17:5896 "ninja_build_writer.cc",
97 "ninja_build_writer.h",
[email protected]c0822d7f2013-08-13 17:10:5698 "ninja_copy_target_writer.cc",
99 "ninja_copy_target_writer.h",
100 "ninja_group_target_writer.cc",
101 "ninja_group_target_writer.h",
[email protected]0dfcae72014-08-19 22:52:16102 "ninja_utils.cc",
103 "ninja_utils.h",
[email protected]ceb18412013-07-31 19:17:58104 "ninja_target_writer.cc",
105 "ninja_target_writer.h",
106 "ninja_toolchain_writer.cc",
107 "ninja_toolchain_writer.h",
108 "ninja_writer.cc",
109 "ninja_writer.h",
110 "operators.cc",
111 "operators.h",
[email protected]0dfcae72014-08-19 22:52:16112 "output_file.cc",
[email protected]ceb18412013-07-31 19:17:58113 "output_file.h",
114 "parse_tree.cc",
115 "parse_tree.h",
116 "parser.cc",
117 "parser.h",
118 "path_output.cc",
119 "path_output.h",
120 "pattern.cc",
121 "pattern.h",
122 "scheduler.cc",
123 "scheduler.h",
124 "scope.cc",
125 "scope.h",
126 "scope_per_file_provider.cc",
127 "scope_per_file_provider.h",
128 "settings.cc",
129 "settings.h",
130 "setup.cc",
131 "setup.h",
132 "source_dir.cc",
133 "source_dir.h",
134 "source_file.cc",
135 "source_file.h",
[email protected]0dfcae72014-08-19 22:52:16136 "source_file_type.cc",
137 "source_file_type.h",
[email protected]ceb18412013-07-31 19:17:58138 "standard_out.cc",
139 "standard_out.h",
140 "string_utils.cc",
141 "string_utils.h",
[email protected]012db5942014-08-06 20:38:45142 "substitution_list.cc",
143 "substitution_list.h",
144 "substitution_pattern.cc",
145 "substitution_pattern.h",
146 "substitution_type.cc",
147 "substitution_type.h",
148 "substitution_writer.cc",
149 "substitution_writer.h",
[email protected]ceb18412013-07-31 19:17:58150 "target.cc",
151 "target.h",
152 "target_generator.cc",
153 "target_generator.h",
[email protected]a4e862922014-03-27 21:16:22154 "template.cc",
155 "template.h",
[email protected]ceb18412013-07-31 19:17:58156 "token.cc",
157 "token.h",
158 "tokenizer.cc",
[email protected]0dfcae72014-08-19 22:52:16159 "tool.cc",
160 "tool.h",
[email protected]ceb18412013-07-31 19:17:58161 "tokenizer.h",
162 "toolchain.cc",
163 "toolchain.h",
[email protected]7f8c9fc2013-09-23 18:08:28164 "trace.cc",
165 "trace.h",
[email protected]8fc56182014-08-06 21:44:33166 "unique_vector.h",
[email protected]ceb18412013-07-31 19:17:58167 "value.cc",
168 "value.h",
169 "value_extractors.cc",
170 "value_extractors.h",
[email protected]4441041b2013-08-06 21:11:06171 "variables.cc",
172 "variables.h",
[email protected]60c9d172014-04-01 21:45:11173 "visibility.cc",
174 "visibility.h",
[email protected]ceb18412013-07-31 19:17:58175 ]
[email protected]9af0b832013-11-08 20:31:13176
[email protected]ceb18412013-07-31 19:17:58177 deps = [
178 "//base",
179 "//base/third_party/dynamic_annotations",
180 ]
181}
182
Brett Wilson48c29f22014-08-25 19:06:58183action("last_commit_position") {
184 script = "last_commit_position.py"
185
186 # This dependency forces a re-run when the code is synced.
187 inputs = [ "//build/util/LASTCHANGE" ]
188
189 outfile = "$target_gen_dir/last_commit_position.h"
190 outputs = [ outfile ]
191
192 args = [
193 rebase_path("//", root_build_dir),
194 rebase_path(outfile, root_build_dir),
195 "TOOLS_GN_LAST_COMMIT_POSITION_H_",
196 ]
197}
198
[email protected]ceb18412013-07-31 19:17:58199executable("gn") {
200 sources = [
201 "gn_main.cc",
202 ]
[email protected]9af0b832013-11-08 20:31:13203
[email protected]ceb18412013-07-31 19:17:58204 deps = [
205 ":gn_lib",
Brett Wilson48c29f22014-08-25 19:06:58206 ":last_commit_position",
[email protected]ceb18412013-07-31 19:17:58207 ]
208}
209
210test("gn_unittests") {
211 sources = [
[email protected]012db5942014-08-06 20:38:45212 "action_target_generator_unittest.cc",
[email protected]26542b02013-11-08 23:25:04213 "builder_unittest.cc",
[email protected]126d8b52014-04-07 22:17:35214 "c_include_iterator_unittest.cc",
scottmg2dd93e8b2014-09-26 04:07:05215 "command_format_unittest.cc",
[email protected]58d2a902014-04-15 22:15:36216 "config_values_extractors_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58217 "escape_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58218 "filesystem_utils_unittest.cc",
[email protected]92cafe52014-05-13 19:42:25219 "function_foreach_unittest.cc",
[email protected]7380ca72014-05-13 16:56:20220 "function_get_label_info_unittest.cc",
[email protected]01bd79b2014-06-05 17:36:25221 "function_get_path_info_unittest.cc",
[email protected]e1bd79f2014-05-05 20:27:53222 "function_get_target_outputs_unittest.cc",
[email protected]209d521c2014-08-12 23:29:06223 "function_process_file_template_unittest.cc",
[email protected]ea3690c2013-09-23 17:59:22224 "function_rebase_path_unittest.cc",
[email protected]fd546752014-05-30 16:24:33225 "function_write_file_unittest.cc",
[email protected]3ffa36a2014-07-24 21:01:50226 "functions_target_unittest.cc",
[email protected]a4e862922014-03-27 21:16:22227 "functions_unittest.cc",
[email protected]126d8b52014-04-07 22:17:35228 "header_checker_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58229 "input_conversion_unittest.cc",
brettw3741b722014-08-29 17:07:20230 "label_pattern_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58231 "label_unittest.cc",
[email protected]26542b02013-11-08 23:25:04232 "loader_unittest.cc",
[email protected]2fbe1012014-03-20 17:59:15233 "ninja_action_target_writer_unittest.cc",
[email protected]7ff2f5d2013-10-08 21:30:34234 "ninja_binary_target_writer_unittest.cc",
[email protected]b90c75a2013-09-18 22:02:50235 "ninja_copy_target_writer_unittest.cc",
cjhopman1b668a2e92014-09-09 16:30:40236 "ninja_group_target_writer_unittest.cc",
[email protected]ef348fe2014-05-01 18:31:31237 "ninja_target_writer_unittest.cc",
[email protected]0dfcae72014-08-19 22:52:16238 "ninja_toolchain_writer_unittest.cc",
[email protected]44196882013-12-21 05:31:11239 "operators_unittest.cc",
[email protected]51d01722014-03-26 16:57:07240 "parse_tree_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58241 "parser_unittest.cc",
242 "path_output_unittest.cc",
243 "pattern_unittest.cc",
[email protected]98756e22014-06-04 16:57:40244 "run_all_unittests.cc",
[email protected]17f43bf2013-08-23 21:04:46245 "scope_per_file_provider_unittest.cc",
[email protected]a2d0b7a2013-12-16 23:59:09246 "scope_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58247 "source_dir_unittest.cc",
248 "string_utils_unittest.cc",
[email protected]012db5942014-08-06 20:38:45249 "substitution_pattern_unittest.cc",
250 "substitution_writer_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58251 "target_generator_unittest.cc",
[email protected]3c1274d2013-09-10 22:21:21252 "target_unittest.cc",
[email protected]1e3fbf7b2014-04-08 19:15:20253 "template_unittest.cc",
[email protected]43bf6a52013-09-17 16:54:24254 "test_with_scope.cc",
255 "test_with_scope.h",
[email protected]ceb18412013-07-31 19:17:58256 "tokenizer_unittest.cc",
[email protected]8fc56182014-08-06 21:44:33257 "unique_vector_unittest.cc",
[email protected]d5645f12014-05-03 04:32:19258 "value_unittest.cc",
[email protected]60c9d172014-04-01 21:45:11259 "visibility_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58260 ]
261 deps = [
262 ":gn_lib",
[email protected]cc7ec692014-04-08 17:20:38263 "//base/test:test_support",
[email protected]23e197d2013-12-31 12:14:01264 "//testing/gtest",
[email protected]ceb18412013-07-31 19:17:58265 ]
266}
267
268executable("generate_test_gn_data") {
269 sources = [ "generate_test_gn_data.cc" ]
270 deps = [ "//base" ]
271}