blob: 143641b7aa02892ab1620cfeec44a2a6744e3a2a [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",
cjhopman55793012014-10-16 19:19:4051 "exec_process.cc",
52 "exec_process.h",
[email protected]ceb18412013-07-31 19:17:5853 "filesystem_utils.cc",
54 "filesystem_utils.h",
55 "functions.cc",
56 "functions.h",
57 "functions_target.cc",
58 "function_exec_script.cc",
[email protected]92cafe52014-05-13 19:42:2559 "function_foreach.cc",
[email protected]7380ca72014-05-13 16:56:2060 "function_get_label_info.cc",
[email protected]01bd79b2014-06-05 17:36:2561 "function_get_path_info.cc",
[email protected]e1bd79f2014-05-05 20:27:5362 "function_get_target_outputs.cc",
[email protected]ceb18412013-07-31 19:17:5863 "function_process_file_template.cc",
64 "function_read_file.cc",
[email protected]ea3690c2013-09-23 17:59:2265 "function_rebase_path.cc",
[email protected]ceb18412013-07-31 19:17:5866 "function_set_default_toolchain.cc",
[email protected]6b4ee782013-08-20 17:13:2467 "function_set_defaults.cc",
[email protected]ceb18412013-07-31 19:17:5868 "function_template.cc",
69 "function_toolchain.cc",
70 "function_write_file.cc",
[email protected]c0822d7f2013-08-13 17:10:5671 "group_target_generator.cc",
72 "group_target_generator.h",
[email protected]126d8b52014-04-07 22:17:3573 "header_checker.cc",
74 "header_checker.h",
[email protected]ceb18412013-07-31 19:17:5875 "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]ceb18412013-07-31 19:17:5885 "label.cc",
86 "label.h",
brettw3741b722014-08-29 17:07:2087 "label_pattern.cc",
88 "label_pattern.h",
[email protected]68d1dd32013-11-01 21:59:5189 "label_ptr.h",
[email protected]26542b02013-11-08 23:25:0490 "loader.cc",
91 "loader.h",
[email protected]b0d3ad5d2013-09-16 23:31:3692 "location.cc",
[email protected]ceb18412013-07-31 19:17:5893 "location.h",
[email protected]2fbe1012014-03-20 17:59:1594 "ninja_action_target_writer.cc",
95 "ninja_action_target_writer.h",
[email protected]c0822d7f2013-08-13 17:10:5696 "ninja_binary_target_writer.cc",
97 "ninja_binary_target_writer.h",
[email protected]ceb18412013-07-31 19:17:5898 "ninja_build_writer.cc",
99 "ninja_build_writer.h",
[email protected]c0822d7f2013-08-13 17:10:56100 "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]0dfcae72014-08-19 22:52:16104 "ninja_utils.cc",
105 "ninja_utils.h",
[email protected]ceb18412013-07-31 19:17:58106 "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]0dfcae72014-08-19 22:52:16114 "output_file.cc",
[email protected]ceb18412013-07-31 19:17:58115 "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]0dfcae72014-08-19 22:52:16138 "source_file_type.cc",
139 "source_file_type.h",
[email protected]ceb18412013-07-31 19:17:58140 "standard_out.cc",
141 "standard_out.h",
142 "string_utils.cc",
143 "string_utils.h",
[email protected]012db5942014-08-06 20:38:45144 "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",
brettw86a7f4bd2014-11-26 22:07:28152 "switches.cc",
153 "switches.h",
[email protected]ceb18412013-07-31 19:17:58154 "target.cc",
155 "target.h",
156 "target_generator.cc",
157 "target_generator.h",
[email protected]a4e862922014-03-27 21:16:22158 "template.cc",
159 "template.h",
[email protected]ceb18412013-07-31 19:17:58160 "token.cc",
161 "token.h",
162 "tokenizer.cc",
[email protected]0dfcae72014-08-19 22:52:16163 "tool.cc",
164 "tool.h",
[email protected]ceb18412013-07-31 19:17:58165 "tokenizer.h",
166 "toolchain.cc",
167 "toolchain.h",
[email protected]7f8c9fc2013-09-23 18:08:28168 "trace.cc",
169 "trace.h",
[email protected]8fc56182014-08-06 21:44:33170 "unique_vector.h",
[email protected]ceb18412013-07-31 19:17:58171 "value.cc",
172 "value.h",
173 "value_extractors.cc",
174 "value_extractors.h",
[email protected]4441041b2013-08-06 21:11:06175 "variables.cc",
176 "variables.h",
[email protected]60c9d172014-04-01 21:45:11177 "visibility.cc",
178 "visibility.h",
[email protected]ceb18412013-07-31 19:17:58179 ]
[email protected]9af0b832013-11-08 20:31:13180
[email protected]ceb18412013-07-31 19:17:58181 deps = [
182 "//base",
183 "//base/third_party/dynamic_annotations",
184 ]
185}
186
Brett Wilson48c29f22014-08-25 19:06:58187action("last_commit_position") {
188 script = "last_commit_position.py"
189
190 # This dependency forces a re-run when the code is synced.
191 inputs = [ "//build/util/LASTCHANGE" ]
192
193 outfile = "$target_gen_dir/last_commit_position.h"
194 outputs = [ outfile ]
195
196 args = [
197 rebase_path("//", root_build_dir),
198 rebase_path(outfile, root_build_dir),
199 "TOOLS_GN_LAST_COMMIT_POSITION_H_",
200 ]
201}
202
[email protected]ceb18412013-07-31 19:17:58203executable("gn") {
204 sources = [
205 "gn_main.cc",
206 ]
[email protected]9af0b832013-11-08 20:31:13207
[email protected]ceb18412013-07-31 19:17:58208 deps = [
209 ":gn_lib",
Brett Wilson48c29f22014-08-25 19:06:58210 ":last_commit_position",
[email protected]ceb18412013-07-31 19:17:58211 ]
212}
213
214test("gn_unittests") {
215 sources = [
[email protected]012db5942014-08-06 20:38:45216 "action_target_generator_unittest.cc",
[email protected]26542b02013-11-08 23:25:04217 "builder_unittest.cc",
[email protected]126d8b52014-04-07 22:17:35218 "c_include_iterator_unittest.cc",
scottmg2dd93e8b2014-09-26 04:07:05219 "command_format_unittest.cc",
[email protected]58d2a902014-04-15 22:15:36220 "config_values_extractors_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58221 "escape_unittest.cc",
cjhopman55793012014-10-16 19:19:40222 "exec_process_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58223 "filesystem_utils_unittest.cc",
[email protected]92cafe52014-05-13 19:42:25224 "function_foreach_unittest.cc",
[email protected]7380ca72014-05-13 16:56:20225 "function_get_label_info_unittest.cc",
[email protected]01bd79b2014-06-05 17:36:25226 "function_get_path_info_unittest.cc",
[email protected]e1bd79f2014-05-05 20:27:53227 "function_get_target_outputs_unittest.cc",
[email protected]209d521c2014-08-12 23:29:06228 "function_process_file_template_unittest.cc",
[email protected]ea3690c2013-09-23 17:59:22229 "function_rebase_path_unittest.cc",
[email protected]fd546752014-05-30 16:24:33230 "function_write_file_unittest.cc",
[email protected]3ffa36a2014-07-24 21:01:50231 "functions_target_unittest.cc",
[email protected]a4e862922014-03-27 21:16:22232 "functions_unittest.cc",
[email protected]126d8b52014-04-07 22:17:35233 "header_checker_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58234 "input_conversion_unittest.cc",
brettw3741b722014-08-29 17:07:20235 "label_pattern_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58236 "label_unittest.cc",
[email protected]26542b02013-11-08 23:25:04237 "loader_unittest.cc",
[email protected]2fbe1012014-03-20 17:59:15238 "ninja_action_target_writer_unittest.cc",
[email protected]7ff2f5d2013-10-08 21:30:34239 "ninja_binary_target_writer_unittest.cc",
[email protected]b90c75a2013-09-18 22:02:50240 "ninja_copy_target_writer_unittest.cc",
cjhopman1b668a2e92014-09-09 16:30:40241 "ninja_group_target_writer_unittest.cc",
[email protected]ef348fe2014-05-01 18:31:31242 "ninja_target_writer_unittest.cc",
[email protected]0dfcae72014-08-19 22:52:16243 "ninja_toolchain_writer_unittest.cc",
[email protected]44196882013-12-21 05:31:11244 "operators_unittest.cc",
[email protected]51d01722014-03-26 16:57:07245 "parse_tree_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58246 "parser_unittest.cc",
247 "path_output_unittest.cc",
248 "pattern_unittest.cc",
[email protected]98756e22014-06-04 16:57:40249 "run_all_unittests.cc",
[email protected]17f43bf2013-08-23 21:04:46250 "scope_per_file_provider_unittest.cc",
[email protected]a2d0b7a2013-12-16 23:59:09251 "scope_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58252 "source_dir_unittest.cc",
253 "string_utils_unittest.cc",
[email protected]012db5942014-08-06 20:38:45254 "substitution_pattern_unittest.cc",
255 "substitution_writer_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58256 "target_generator_unittest.cc",
[email protected]3c1274d2013-09-10 22:21:21257 "target_unittest.cc",
[email protected]1e3fbf7b2014-04-08 19:15:20258 "template_unittest.cc",
[email protected]43bf6a52013-09-17 16:54:24259 "test_with_scope.cc",
260 "test_with_scope.h",
[email protected]ceb18412013-07-31 19:17:58261 "tokenizer_unittest.cc",
[email protected]8fc56182014-08-06 21:44:33262 "unique_vector_unittest.cc",
[email protected]d5645f12014-05-03 04:32:19263 "value_unittest.cc",
[email protected]60c9d172014-04-01 21:45:11264 "visibility_unittest.cc",
[email protected]ceb18412013-07-31 19:17:58265 ]
266 deps = [
267 ":gn_lib",
[email protected]cc7ec692014-04-08 17:20:38268 "//base/test:test_support",
[email protected]23e197d2013-12-31 12:14:01269 "//testing/gtest",
[email protected]ceb18412013-07-31 19:17:58270 ]
271}
272
273executable("generate_test_gn_data") {
274 sources = [ "generate_test_gn_data.cc" ]
275 deps = [ "//base" ]
276}