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",
42 "config_values_extractors.cc",
43 "config_values_extractors.h",
44 "config_values_generator.cc",
45 "config_values_generator.h",
46 "copy_target_generator.cc",
47 "copy_target_generator.h",
56 "filesystem_utils.cc",
58 "function_exec_script.cc",
59 "function_foreach.cc",
60 "function_get_label_info.cc",
61 "function_get_path_info.cc",
62 "function_get_target_outputs.cc",
63 "function_process_file_template.cc",
64 "function_read_file.cc",
65 "function_rebase_path.cc",
66 "function_set_default_toolchain.cc",
67 "function_set_defaults.cc",
68 "function_template.cc",
69 "function_toolchain.cc",
70 "function_write_file.cc",
73 "functions_target.cc",
74 "group_target_generator.cc",
75 "group_target_generator.h",
80 "input_conversion.cc",
84 "input_file_manager.cc",
85 "input_file_manager.h",
97 "ninja_action_target_writer.cc",
98 "ninja_action_target_writer.h",
99 "ninja_binary_target_writer.cc",
100 "ninja_binary_target_writer.h",
101 "ninja_build_writer.cc",
102 "ninja_build_writer.h",
103 "ninja_copy_target_writer.cc",
104 "ninja_copy_target_writer.h",
105 "ninja_group_target_writer.cc",
106 "ninja_group_target_writer.h",
107 "ninja_target_writer.cc",
108 "ninja_target_writer.h",
109 "ninja_toolchain_writer.cc",
110 "ninja_toolchain_writer.h",
131 "scope_per_file_provider.cc",
132 "scope_per_file_provider.h",
141 "source_file_type.cc",
142 "source_file_type.h",
147 "substitution_list.cc",
148 "substitution_list.h",
149 "substitution_pattern.cc",
150 "substitution_pattern.h",
151 "substitution_type.cc",
152 "substitution_type.h",
153 "substitution_writer.cc",
154 "substitution_writer.h",
159 "target_generator.cc",
160 "target_generator.h",
176 "value_extractors.cc",
177 "value_extractors.h",
186 "//base/third_party/dynamic_annotations",
190 action("last_commit_position") {
191 script = "last_commit_position.py"
193 # This dependency forces a re-run when the code is synced.
195 "//build/util/LASTCHANGE",
198 outfile = "$target_gen_dir/last_commit_position.h"
204 rebase_path("//", root_build_dir),
205 rebase_path(outfile, root_build_dir),
206 "TOOLS_GN_LAST_COMMIT_POSITION_H_",
217 ":last_commit_position",
222 test("gn_unittests") {
224 "action_target_generator_unittest.cc",
226 "builder_unittest.cc",
227 "c_include_iterator_unittest.cc",
228 "command_format_unittest.cc",
229 "config_values_extractors_unittest.cc",
230 "escape_unittest.cc",
231 "exec_process_unittest.cc",
232 "filesystem_utils_unittest.cc",
233 "function_foreach_unittest.cc",
234 "function_get_label_info_unittest.cc",
235 "function_get_path_info_unittest.cc",
236 "function_get_target_outputs_unittest.cc",
237 "function_process_file_template_unittest.cc",
238 "function_rebase_path_unittest.cc",
239 "function_write_file_unittest.cc",
240 "functions_target_unittest.cc",
241 "functions_unittest.cc",
242 "header_checker_unittest.cc",
243 "input_conversion_unittest.cc",
244 "label_pattern_unittest.cc",
246 "loader_unittest.cc",
247 "ninja_action_target_writer_unittest.cc",
248 "ninja_binary_target_writer_unittest.cc",
249 "ninja_copy_target_writer_unittest.cc",
250 "ninja_group_target_writer_unittest.cc",
251 "ninja_target_writer_unittest.cc",
252 "ninja_toolchain_writer_unittest.cc",
253 "operators_unittest.cc",
254 "parse_tree_unittest.cc",
255 "parser_unittest.cc",
256 "path_output_unittest.cc",
257 "pattern_unittest.cc",
258 "scope_per_file_provider_unittest.cc",
260 "source_dir_unittest.cc",
261 "string_utils_unittest.cc",
262 "substitution_pattern_unittest.cc",
263 "substitution_writer_unittest.cc",
264 "target_generator_unittest.cc",
265 "target_unittest.cc",
266 "template_unittest.cc",
267 "test_with_scope.cc",
269 "tokenizer_unittest.cc",
270 "unique_vector_unittest.cc",
272 "visibility_unittest.cc",
276 "//base/test:run_all_unittests",
277 "//base/test:test_support",
282 executable("generate_test_gn_data") {
284 "generate_test_gn_data.cc",