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.
5 import("//testing/test.gni")
7 defines = [ "GN_BUILD" ]
9 static_library("gn_lib") {
11 "action_target_generator.cc",
12 "action_target_generator.h",
17 "binary_target_generator.cc",
18 "binary_target_generator.h",
25 "c_include_iterator.cc",
26 "c_include_iterator.h",
41 "config_values_extractors.cc",
42 "config_values_extractors.h",
43 "config_values_generator.cc",
44 "config_values_generator.h",
45 "copy_target_generator.cc",
46 "copy_target_generator.h",
55 "filesystem_utils.cc",
59 "functions_target.cc",
60 "function_exec_script.cc",
61 "function_foreach.cc",
62 "function_get_label_info.cc",
63 "function_get_path_info.cc",
64 "function_get_target_outputs.cc",
65 "function_process_file_template.cc",
66 "function_read_file.cc",
67 "function_rebase_path.cc",
68 "function_set_default_toolchain.cc",
69 "function_set_defaults.cc",
70 "function_template.cc",
71 "function_toolchain.cc",
72 "function_write_file.cc",
73 "group_target_generator.cc",
74 "group_target_generator.h",
79 "input_conversion.cc",
83 "input_file_manager.cc",
84 "input_file_manager.h",
96 "ninja_action_target_writer.cc",
97 "ninja_action_target_writer.h",
98 "ninja_binary_target_writer.cc",
99 "ninja_binary_target_writer.h",
100 "ninja_build_writer.cc",
101 "ninja_build_writer.h",
102 "ninja_copy_target_writer.cc",
103 "ninja_copy_target_writer.h",
104 "ninja_group_target_writer.cc",
105 "ninja_group_target_writer.h",
108 "ninja_target_writer.cc",
109 "ninja_target_writer.h",
110 "ninja_toolchain_writer.cc",
111 "ninja_toolchain_writer.h",
130 "scope_per_file_provider.cc",
131 "scope_per_file_provider.h",
140 "source_file_type.cc",
141 "source_file_type.h",
146 "substitution_list.cc",
147 "substitution_list.h",
148 "substitution_pattern.cc",
149 "substitution_pattern.h",
150 "substitution_type.cc",
151 "substitution_type.h",
152 "substitution_writer.cc",
153 "substitution_writer.h",
158 "target_generator.cc",
159 "target_generator.h",
175 "value_extractors.cc",
176 "value_extractors.h",
185 "//base/third_party/dynamic_annotations",
189 action("last_commit_position") {
190 script = "last_commit_position.py"
192 # This dependency forces a re-run when the code is synced.
194 "//build/util/LASTCHANGE",
197 outfile = "$target_gen_dir/last_commit_position.h"
203 rebase_path("//", root_build_dir),
204 rebase_path(outfile, root_build_dir),
205 "TOOLS_GN_LAST_COMMIT_POSITION_H_",
216 ":last_commit_position",
221 test("gn_unittests") {
223 "action_target_generator_unittest.cc",
224 "builder_unittest.cc",
225 "c_include_iterator_unittest.cc",
226 "command_format_unittest.cc",
227 "config_values_extractors_unittest.cc",
228 "escape_unittest.cc",
229 "exec_process_unittest.cc",
230 "filesystem_utils_unittest.cc",
231 "function_foreach_unittest.cc",
232 "function_get_label_info_unittest.cc",
233 "function_get_path_info_unittest.cc",
234 "function_get_target_outputs_unittest.cc",
235 "function_process_file_template_unittest.cc",
236 "function_rebase_path_unittest.cc",
237 "function_write_file_unittest.cc",
238 "functions_target_unittest.cc",
239 "functions_unittest.cc",
240 "header_checker_unittest.cc",
241 "input_conversion_unittest.cc",
242 "label_pattern_unittest.cc",
244 "loader_unittest.cc",
245 "ninja_action_target_writer_unittest.cc",
246 "ninja_binary_target_writer_unittest.cc",
247 "ninja_copy_target_writer_unittest.cc",
248 "ninja_group_target_writer_unittest.cc",
249 "ninja_target_writer_unittest.cc",
250 "ninja_toolchain_writer_unittest.cc",
251 "operators_unittest.cc",
252 "parse_tree_unittest.cc",
253 "parser_unittest.cc",
254 "path_output_unittest.cc",
255 "pattern_unittest.cc",
256 "run_all_unittests.cc",
257 "scope_per_file_provider_unittest.cc",
259 "source_dir_unittest.cc",
260 "string_utils_unittest.cc",
261 "substitution_pattern_unittest.cc",
262 "substitution_writer_unittest.cc",
263 "target_generator_unittest.cc",
264 "target_unittest.cc",
265 "template_unittest.cc",
266 "test_with_scope.cc",
268 "tokenizer_unittest.cc",
269 "unique_vector_unittest.cc",
271 "visibility_unittest.cc",
275 "//base/test:test_support",
280 executable("generate_test_gn_data") {
282 "generate_test_gn_data.cc",